    

 ## On this page

  

 

 # DataObjectPtr Class Reference

 Last update: 16.07.2025 

A shared pointer wrapper for data objects. [More...](class_data_object_ptr.xhtml#details)

## <a name="pub-types"></a>Public Types

<a id="a09f51db57aeca694ba21f535268b2caf"></a>typedef DataObject [Base](class_data_object_ptr.xhtml#a09f51db57aeca694ba21f535268b2caf) the data type   
 <a id="afa0bd4d832168701ce39642b559bf810"></a>typedef boost::weak\_ptr&lt; DataObject &gt; [ObserverPtr](class_data_object_ptr.xhtml#afa0bd4d832168701ce39642b559bf810) an observer for the shared pointer type   
 <a id="a46d3f34a7866e39589a2b26177a3c85b"></a>typedef std::list&lt; [ObserverPtr](class_data_object_ptr.xhtml#afa0bd4d832168701ce39642b559bf810) &gt; [ObserverPtrList](class_data_object_ptr.xhtml#a46d3f34a7866e39589a2b26177a3c85b) A list of observer pointers.   
 <a id="a05d711ff954f9f9ce0c2bd74419b2866"></a>typedef boost::shared\_ptr&lt; DataObject &gt; [Ptr](class_data_object_ptr.xhtml#a05d711ff954f9f9ce0c2bd74419b2866) the shared pointer type   
 <a id="aa1ded226048e7a66da648cffd6711135"></a>typedef string [string\_type](class_data_object_ptr.xhtml#aa1ded226048e7a66da648cffd6711135) a string type   
 ## <a name="pub-methods"></a>Public Member Functions

bool [operator!=](class_data_object_ptr.xhtml#a5fcde290fd88681d2e9e001a32b459c2) (std::nullptr\_t) bool [operator==](class_data_object_ptr.xhtml#a04290a57633bc8e5f56db69143d21ae1) (std::nullptr\_t) Access

[Base](class_data_object_ptr.xhtml#a09f51db57aeca694ba21f535268b2caf) [operator\*](class_data_object_ptr.xhtml#a1d75b51141d0038b899c559556099eb9) () [Base](class_data_object_ptr.xhtml#a09f51db57aeca694ba21f535268b2caf) \* [operator-&gt;](class_data_object_ptr.xhtml#a7ec341e963e6523d0dc675e834a55260) () [Base](class_data_object_ptr.xhtml#a09f51db57aeca694ba21f535268b2caf) \* [operator-&gt;](class_data_object_ptr.xhtml#a7ec341e963e6523d0dc675e834a55260) () Modifier

[DataObjectKey](class_data_object_key.xhtml) [ident](class_data_object_ptr.xhtml#a0d8af7ea437aff47519ec89fbdcec396) ()  [setDescription](class_data_object_ptr.xhtml#a4260ac809eb735741f23b5bf8184d51e) ([string\_type](class_data_object_ptr.xhtml#aa1ded226048e7a66da648cffd6711135) description) Set the description of this DataObject, as displayed in the GUI's Quantity Information pane. [More...](#a4260ac809eb735741f23b5bf8184d51e)  
  [generateDescription](class_data_object_ptr.xhtml#adb4ae4fd523acf2d4e22f98f6e49bd29) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) (Re)Generates the description string based on all available META data [More...](#adb4ae4fd523acf2d4e22f98f6e49bd29)  
 <a id="a74f4470cdd92983fd2bc8947c68f863e"></a> [setActive](class_data_object_ptr.xhtml#a74f4470cdd92983fd2bc8947c68f863e) () Sets the DataObject active.   
  [setInactive](class_data_object_ptr.xhtml#af3f6a8f453e6bc82d6b23f0b29379e2c) () Sets the DataObject inactive. [More...](#af3f6a8f453e6bc82d6b23f0b29379e2c)  
 Operations

Miscellaneous methods



bool [isValid](class_data_object_ptr.xhtml#afe93e17ac89cd97917811068ba2af214) () [DataObjectPtr](class_data_object_ptr.xhtml) [getMissingData](class_data_object_ptr.xhtml#a409999570abae1c6fb513f7a05ff28d9) () Converts the missing data information of this object to a regular new data object. [More...](#a409999570abae1c6fb513f7a05ff28d9)  
 [DataObjectPtr](class_data_object_ptr.xhtml) [getFullData](class_data_object_ptr.xhtml#ab6b7802b0e7a9913022f60f84af8d7a8) () Extracts the value data of this object and copies it to another object by marking all items as non-missing (takes the interpolated value) [More...](#ab6b7802b0e7a9913022f60f84af8d7a8)  
 [Matrix](class_matrix.xhtml) [getData](class_data_object_ptr.xhtml#aa34d981457a2c81fc0b5a82480dc309f) () Gives access to the encapsulated data by copying it into TMATH matrix object. [More...](#aa34d981457a2c81fc0b5a82480dc309f)  
 ## <a name="friends"></a>Friends

<a id="af2f2287f07e19933a935a60b337c7014"></a>class **DataObject** <a id="af0715c8b293645f260ddc037cbc527ee"></a>class **DataObjectDependencies** <a id="details" name="details"></a>## Detailed Description

A shared pointer wrapper for data objects.

SoS acts mainly on shared pointers. This reduces memory consumption and computing time when passing objects to various software components. Furthermore, SoS should protect data manipulation once data gets added to the database. Write access should be limited to meta information only, e.g. dependencies, active state, ...   
 This class is such a encapsulating shared pointer including the following functionality:

- It manages the dependency information of data objects. This information cannot be treated by the objects themselves (because they do not know the reference to the boost\_shared\_ptr). Hence the shared\_ptr itself must treat the dependencies on other objects.
- When submitting the dependency information to the constructor, it is sufficient to set the master objects
- If you want to add dependencies after creating the pointer object, you must append the connections to the list of masters AND slaves of the respective object pairs.
- Once a pointer object is created, write access to the underlying data object should be limited to properties only. Therefore its envisaged to remove all non accessors.



## Member Function Documentation

<a id="adb4ae4fd523acf2d4e22f98f6e49bd29"></a>## [◆ ](#adb4ae4fd523acf2d4e22f98f6e49bd29)generateDescription()

 generateDescription  ( [Structure](class_structure.xhtml)  *database*) 

(Re)Generates the description string based on all available META data

Parameters databaseThe database used 



<a id="aa34d981457a2c81fc0b5a82480dc309f"></a>## [◆ ](#aa34d981457a2c81fc0b5a82480dc309f)getData()

 [Matrix](class_matrix.xhtml) getData  ( ) 

Gives access to the encapsulated data by copying it into TMATH matrix object.

ReturnsA new TMATH column vector containing the data of this data object. 



<a id="ab6b7802b0e7a9913022f60f84af8d7a8"></a>## [◆ ](#ab6b7802b0e7a9913022f60f84af8d7a8)getFullData()

 [DataObjectPtr](class_data_object_ptr.xhtml) getFullData  ( ) 

Extracts the value data of this object and copies it to another object by marking all items as non-missing (takes the interpolated value)

ReturnsA temporary copy to the extracted data 



<a id="a409999570abae1c6fb513f7a05ff28d9"></a>## [◆ ](#a409999570abae1c6fb513f7a05ff28d9)getMissingData()

 [DataObjectPtr](class_data_object_ptr.xhtml) getMissingData  ( ) 

Converts the missing data information of this object to a regular new data object.

The missing data information of this object is COPIED to a new data object instance, including a new dependency object with this object set to master

Returnsa shared pointer of a data object representing the missing data of this object 



<a id="a0d8af7ea437aff47519ec89fbdcec396"></a>## [◆ ](#a0d8af7ea437aff47519ec89fbdcec396)ident()

 [DataObjectKey](class_data_object_key.xhtml) ident  ( ) 

ReturnsGet the [DataObjectKey](class_data_object_key.xhtml "the key (ident) of a data object in generic containers. "), containing the design ID and quantity ID of this DataObject 



<a id="afe93e17ac89cd97917811068ba2af214"></a>## [◆ ](#afe93e17ac89cd97917811068ba2af214)isValid()

 bool isValid  ( ) 

Returnstrue if the pointer is valid 



<a id="a5fcde290fd88681d2e9e001a32b459c2"></a>## [◆ ](#a5fcde290fd88681d2e9e001a32b459c2)operator!=()

 bool operator!=  ( std::nullptr\_t  ) 

Returnstrue if the pointer is valid 



<a id="a1d75b51141d0038b899c559556099eb9"></a>## [◆ ](#a1d75b51141d0038b899c559556099eb9)operator\*()

 [Base](class_data_object_ptr.xhtml#a09f51db57aeca694ba21f535268b2caf) operator\*  ( ) 

Returnsa reference to the wrapped object, See alsoref() 



<a id="a7ec341e963e6523d0dc675e834a55260"></a>## [◆ ](#a7ec341e963e6523d0dc675e834a55260)operator-&gt;() \[1/2\]

 [Base](class_data_object_ptr.xhtml#a09f51db57aeca694ba21f535268b2caf)\* operator-&gt;  ( ) 

ReturnsA pointer to the wrapped object **[Deprecated:](deprecated.xhtml#_deprecated000001)**Do not use this method, as it is intended to be removed soon! 



<a id="a7ec341e963e6523d0dc675e834a55260"></a>## [◆ ](#a7ec341e963e6523d0dc675e834a55260)operator-&gt;() \[2/2\]

 [Base](class_data_object_ptr.xhtml#a09f51db57aeca694ba21f535268b2caf)\* operator-&gt;  ( ) 

Returnsa pointer to the wrapped object **[Deprecated:](deprecated.xhtml#_deprecated000002)**Do NOT even THING it to use this method! It will be definitely removed soon! 



<a id="a04290a57633bc8e5f56db69143d21ae1"></a>## [◆ ](#a04290a57633bc8e5f56db69143d21ae1)operator==()

 bool operator==  ( std::nullptr\_t  ) 

Returnstrue if the pointer is not valid 



<a id="a4260ac809eb735741f23b5bf8184d51e"></a>## [◆ ](#a4260ac809eb735741f23b5bf8184d51e)setDescription()

 setDescription  ( [string\_type](class_data_object_ptr.xhtml#aa1ded226048e7a66da648cffd6711135)  *description*) 

Set the description of this DataObject, as displayed in the GUI's Quantity Information pane.

Parameters descriptionThe new description 



<a id="af3f6a8f453e6bc82d6b23f0b29379e2c"></a>## [◆ ](#af3f6a8f453e6bc82d6b23f0b29379e2c)setInactive()

 setInactive  ( ) 

Sets the DataObject inactive.

Parameters databaseThe database where all data are stored NoteThe method marks all slave objects as "needs update"