#include <ModelServices.h>

Public Member Functions | |
| virtual DataDescriptor * | createDataDescriptor (const std::string &name, const std::string &type, DataElement *pParent) const =0 |
| virtual DataDescriptor * | createDataDescriptor (const std::string &name, const std::string &type, const std::vector< std::string > &parent) const =0 |
| virtual void | destroyDataDescriptor (DataDescriptor *pDescriptor) const =0 |
| virtual ImportDescriptor * | createImportDescriptor (const std::string &name, const std::string &type, DataElement *pParent, bool bImported=true) const =0 |
| virtual ImportDescriptor * | createImportDescriptor (const std::string &name, const std::string &type, const std::vector< std::string > &parent, bool bImported=true) const =0 |
| virtual ImportDescriptor * | createImportDescriptor (DataDescriptor *pDescriptor, bool bImported=true) const =0 |
| virtual void | destroyImportDescriptor (ImportDescriptor *pImportDescriptor) const =0 |
| virtual bool | addElementType (const std::string &elementType)=0 |
| virtual bool | hasElementType (const std::string &elementType) const =0 |
| virtual const std::vector < std::string > & | getValidElementTypes () const =0 |
| virtual std::vector < DataElement * > | createElements (const std::vector< DataDescriptor * > &descriptors)=0 |
| virtual DataElement * | createElement (const DataDescriptor *pDescriptor)=0 |
| virtual DataElement * | createElement (const std::string &name, const std::string &type, DataElement *pParent)=0 |
| virtual DataElement * | getElement (const std::string &name, const std::string &type, const DataElement *pParent) const =0 |
| virtual DataElement * | getElement (const std::vector< std::string > &designator, const std::string &type) const =0 |
| virtual std::vector < DataElement * > | getElements (const std::string &type) const =0 |
| virtual std::vector < DataElement * > | getElements (const DataElement *pParent, const std::string &type) const =0 |
| virtual std::vector < DataElement * > | getElements (const std::string &filename, const std::string &type) const =0 |
| virtual std::vector< std::string > | getElementNames (const std::string &type) const =0 |
| virtual std::vector< std::string > | getElementNames (const DataElement *pParent, const std::string &type) const =0 |
| virtual std::vector< std::string > | getElementNames (const std::string &filename, const std::string &type) const =0 |
| virtual bool | setElementName (DataElement *pElement, const std::string &name)=0 |
| virtual bool | setElementParent (DataElement *pElement, DataElement *pParent)=0 |
| virtual bool | removeElement (const DataElement *pElement)=0 |
| virtual bool | destroyElement (DataElement *pElement)=0 |
| virtual void | clear ()=0 |
| virtual char * | getMemoryBlock (size_t size)=0 |
| virtual void | deleteMemoryBlock (char *memory)=0 |
| virtual bool | isKindOfElement (const std::string &className, const std::string &elementName) const =0 |
| virtual void | getElementTypes (const std::string &className, std::vector< std::string > &classList) const =0 |
| virtual bool | isKindOfDataDescriptor (const std::string &className, const std::string &descriptorName) const =0 |
| virtual void | getDataDescriptorTypes (const std::string &className, std::vector< std::string > &classList) const =0 |
| virtual bool | isKindOfFileDescriptor (const std::string &className, const std::string &descriptorName) const =0 |
| virtual void | getFileDescriptorTypes (const std::string &className, std::vector< std::string > &classList) const =0 |
Static Public Member Functions | |
| static const std::string & | signalElementCreated () |
| static const std::string & | signalElementDestroyed () |
| static const std::string & | signalElementReparented () |
| static double | getDataValue (EncodingType type, const void *pData, int iIndex) |
| static double | getDataValue (EncodingType type, const void *pData, ComplexComponent component, int iIndex) |
| template<class T> | |
| static void | getDataValue (const T *pData, ComplexComponent component, int iIndex, double &dValue) |
| static unsigned char | getDataValue (const unsigned char &data, ComplexComponent component) |
| static signed char | getDataValue (const signed char &data, ComplexComponent component) |
| static unsigned short | getDataValue (const unsigned short &data, ComplexComponent component) |
| static signed short | getDataValue (const signed short &data, ComplexComponent component) |
| static double | getDataValue (const IntegerComplex &data, ComplexComponent component) |
| static unsigned int | getDataValue (const unsigned int &data, ComplexComponent component) |
| static signed int | getDataValue (const signed int &data, ComplexComponent component) |
| static float | getDataValue (const float &data, ComplexComponent component) |
| static double | getDataValue (const FloatComplex &data, ComplexComponent component) |
| static double | getDataValue (const double &data, ComplexComponent component) |
Protected Member Functions | |
| virtual | ~ModelServices () |
Related Functions | |
| (Note that these are not member functions.) | |
| template<typename Destination, typename Source> | |
| Destination | model_cast (Source pSourcePtr) |
This interface allows for creation and manipulation of data, including access to a session within the application. Data is stored in elements that contain descriptor classes to provide information related to the data.
Each element is stored internally according to a key that is comprised of a name, type, and a parent element. The combination of these three identifiers must be unique when creating a new element, renaming an existing element, or reparenting an existing element.
The parent element allows for different elements of different types to be associated with each other. For example, a common parent/child pair is an AoiElement element that has a RasterElement parent to indicate that the area of interest relates to a specific data set.
If an element has a non-NULL parent element, the element will be destroyed when its parent is destroyed.
This subclass of Subject will notify upon the following conditions:
Definition at line 55 of file ModelServices.h.
| virtual ModelServices::~ModelServices | ( | ) | [protected, virtual] |
This will be cleaned up during application close.
Plug-ins do not need to destroy it.
Definition at line 1044 of file ModelServices.h.
| static const std::string& ModelServices::signalElementCreated | ( | ) | [static] |
Emitted with boost::any<DataElement*> when a DataElement is created.
Definition at line 61 of file ModelServices.h.
| static const std::string& ModelServices::signalElementDestroyed | ( | ) | [static] |
Emitted with boost::any<DataElement*> when a DataElement is destroyed.
Definition at line 66 of file ModelServices.h.
| static const std::string& ModelServices::signalElementReparented | ( | ) | [static] |
Emitted with boost::any<DataElement*> when the parent of a DataElement changes.
Definition at line 72 of file ModelServices.h.
| virtual DataDescriptor* ModelServices::createDataDescriptor | ( | const std::string & | name, | |
| const std::string & | type, | |||
| DataElement * | pParent | |||
| ) | const [pure virtual] |
Creates an empty data descriptor.
This method creates an empty data descriptor that can be populated so that a data element can be created. The memory for the data is allocated by the studio but owned by the plug-in, so plug-in must destroy the data descriptor by calling the destroyDataDescriptor() method.
| name | The name for the data element. | |
| type | The type of the data element, which is used to determine the kind of element to create when createElement() is called. To create a data element from the returned data descriptor, the type string must be one of the valid element types returned from getValidElementTypes(). For raster data types, a RasterDataDescriptor is created. For all other types, a DataDescriptor is created. | |
| pParent | An optional parent element to which the new element will be associated. Passing in NULL indicates that the new element is not associated with another element. If the parent is non-NULL, the returned element is automatically destroyed when the parent element is destroyed. The new DataDescriptor inherits the parent's classification unless the parent is NULL, in which case the classification will be set to the system's highest level of classification. |
| virtual DataDescriptor* ModelServices::createDataDescriptor | ( | const std::string & | name, | |
| const std::string & | type, | |||
| const std::vector< std::string > & | parent | |||
| ) | const [pure virtual] |
Creates an empty data descriptor.
This method creates a DataDescriptor with a parent specified as a vector of strings. It should not be called if the parent data element already exists. It is to be used when the parent has not yet been created. Since the parent should not exist, the classification will be set to the highest level of the system. It is the responsibility of the caller to set the proper classification settings.
| name | The name for the data element. | |
| type | The type of the data element, which is used to determine the kind of element to create when createElement() is called. To create a data element from the returned data descriptor, the type string must be one of the valid element types returned from getValidElementTypes(). For raster data types, a RasterDataDescriptor is created. For all other types, a DataDescriptor is created. | |
| parent | A parent element to which the new element will be associated. This parent is specified as a vector of names of elements. The first name in the vector is the top-level element, the next name is a child of that element, and so on. Passing an empty vector will create a top-level element. |
| virtual void ModelServices::destroyDataDescriptor | ( | DataDescriptor * | pDescriptor | ) | const [pure virtual] |
Destroys a data descriptor.
This destroys a data descriptor that was created with the createDataDescriptor() method.
| pDescriptor | The data descriptor to destroy. |
| virtual ImportDescriptor* ModelServices::createImportDescriptor | ( | const std::string & | name, | |
| const std::string & | type, | |||
| DataElement * | pParent, | |||
| bool | bImported = true | |||
| ) | const [pure virtual] |
Creates an import descriptor.
This method creates an import descriptor that contains a data descriptor that can be populated so that a data element can be imported. Ownership of the import descriptor is transferred to the caller, so the destroyImportDescriptor() method should be called to destroy the object. The import descriptor maintains ownership of the created data descriptor.
| name | The name for the data element. | |
| type | The type of the data element, which is used to determine the kind of element to create when createElement() is called. To create a data element from the returned data descriptor, the type string must be one of the valid element types returned from getValidElementTypes(). For raster data types, a RasterDataDescriptor is created. For all other types, a DataDescriptor is created. | |
| pParent | An optional parent element to which the new element will be associated. Passing in NULL indicates that the new element is not associated with another element. If the parent is non-NULL, the returned element is automatically destroyed when the parent element is destroyed. The created data descriptor in the new import descriptor inherits the parent's classification unless the parent is NULL, in which case the classification will be set to the system's highest level of classification. | |
| bImported | Set this parameter to true to import the element or to false to not create the data element on import. |
| virtual ImportDescriptor* ModelServices::createImportDescriptor | ( | const std::string & | name, | |
| const std::string & | type, | |||
| const std::vector< std::string > & | parent, | |||
| bool | bImported = true | |||
| ) | const [pure virtual] |
Creates an import descriptor.
This method creates an import descriptor whose parent is specified as a vector of names. It should not be called if the parent data element already exists. It is to be used when the parent has not yet been created, e.g., in an importer to display the hierarchy of data elements to be imported in the import options widget. Since the parent should not exist, the classification will be set to the highest level of the system. It is the responsibility of the caller to set the proper classification settings.
| name | The name for the data element. | |
| type | The type of the data element, which is used to determine the kind of element to create when createElement() is called. To create a data element from the returned data descriptor, the type string must be one of the valid element types returned from getValidElementTypes(). For raster data types, a RasterDataDescriptor is created. For all other types, a DataDescriptor is created. | |
| parent | A parent element to which the new element will be associated. This parent is specified as a vector of names of elements. The first name in the vector is the top-level element, the next name is a child of that element, and so on. Passing an empty vector will create a top-level element. | |
| bImported | Set this parameter to true to import the element or to false to not create the data element on import. |
| virtual ImportDescriptor* ModelServices::createImportDescriptor | ( | DataDescriptor * | pDescriptor, | |
| bool | bImported = true | |||
| ) | const [pure virtual] |
Creates an import descriptor.
This method creates an import descriptor that contains a given data descriptor so that a data element can be imported. Ownership of the import descriptor is transferred to the caller, so the destroyImportDescriptor() method should be called to destroy the object. Ownership of the given data descriptor is transferred to the created import descriptor.
| pDescriptor | The data descriptor with which to create the data element on import. | |
| bImported | Set this parameter to true to create the data element and load the data on import or to false to not create the data element on import. |
| virtual void ModelServices::destroyImportDescriptor | ( | ImportDescriptor * | pImportDescriptor | ) | const [pure virtual] |
Destroys an import descriptor.
This destroys an import descriptor that was created with the createImportDescriptor() method.
| pImportDescriptor | The import descriptor to destroy. |
| virtual bool ModelServices::addElementType | ( | const std::string & | elementType | ) | [pure virtual] |
Adds a new element type to the list of valid types.
This method adds a new element type to the list of valid types and also adds the new type as a valid plug-in arg type in PlugInManagerServices.
New element types are added to distinguish between multiple custom data types stored in an Any element. A new plug-in arg type is automatically registered with PlugInManagerServices, and when creating an arg with the new element type, the arg value must be set to the Any element and not the AnyData object contained in the Any element.
| elementType | The new element type. |
| virtual bool ModelServices::hasElementType | ( | const std::string & | elementType | ) | const [pure virtual] |
Queries whether a given type is a valid element type.
| elementType | The type to query whether it is a valid element type. |
| virtual const std::vector<std::string>& ModelServices::getValidElementTypes | ( | ) | const [pure virtual] |
Returns the valid element types.
This method returns the names of each recognized element type. Custom element types can be added to the list by calling the addElementType() method. When a element with a custom type is created, an Any element is created.
The default element types are as follows:
| virtual std::vector<DataElement*> ModelServices::createElements | ( | const std::vector< DataDescriptor * > & | descriptors | ) | [pure virtual] |
Creates multiple data elements as a batch, ensuring proper parentage.
This method creates a data element for each DataDescriptor. When created, each element will have the parentage specified in the DataDescriptor. The group will be created in an order that guarantees a new element's parent exists before it is created as long as that parent exists before the call to createElements() or is part of the group of new elements. If a new element requests a parent that does not already exist and is not in the vector of DataDescriptors, that element will not be created.
| descriptors | A vector of DataDescriptors describing the elements to be created. |
| virtual DataElement* ModelServices::createElement | ( | const DataDescriptor * | pDescriptor | ) | [pure virtual] |
Creates an empty data element with no data.
This method creates an element based on the given data descriptor. The type in the data descriptor must be one of the valid element types returned from getValidElementTypes().
The memory for the element is created and maintained by the studio. A deep copy of the given data descriptor is made so the calling object should destroy the data descriptor after calling this method. The new element inherits the classification settings of the passed in data descriptor.
| pDescriptor | The data descriptor from which to create the data element. The type in the data descriptor is used to determine the kind of element to create and must be one of the types returned from getValidElementTypes(). If a valid custom type is specified, an Any element is created. This method does nothing if NULL is passed in. |
NULL is returned in the following conditions:NULL pointer even if the temporary file required for the element can't be created. This behavior is necessary to prevent performance problems with importers. If you use this method to create an ON_DISK or ON_DISK_READ_ONLY raster element, a NULL check on the return from this method will not insure that the returned data element is usable. A better way is to check the return from a call to RasterElement::createDefaultPager() which will return false if the associated temporary file can not be created. For an even simpler approach, use RasterUtilities::createRasterElement() instead of this method to create the data element. RasterUtilities::createRasterElement() will return NULL if either the memory can't be allocated or the temporary file can't be created.| virtual DataElement* ModelServices::createElement | ( | const std::string & | name, | |
| const std::string & | type, | |||
| DataElement * | pParent | |||
| ) | [pure virtual] |
Creates an empty data element with no data.
This is a convenience method that creates a data element without needing to first create a data descriptor and then destroy the data descriptor after the element is created. It is typically used to create simple data elements such as AOIs and GCP lists. The new element inherits the classification settings of the parent element unless the parent is NULL, in which case the new element's classification will be set to the system's highest level.
| name | The string name for the data element to create. | |
| type | The string name corresponding to the type of the data element to create. The types must be one of the valid element types returned from getValidElementTypes(). If a valid custom type is passed in, an Any element is created. | |
| pParent | The parent element of the element to create. Passing in NULL indicates that the element is not associated with another element. If the parent is non-NULL, the returned element is automatically destroyed when the parent element is destroyed. |
| virtual DataElement* ModelServices::getElement | ( | const std::string & | name, | |
| const std::string & | type, | |||
| const DataElement * | pParent | |||
| ) | const [pure virtual] |
Retrieves a data element.
| name | The string name for the data element to retrieve. | |
| type | The string name corresponding to the type of the data element to retrieve. If this is an empty string, an element of any type is retrieved. | |
| pParent | The parent element of the element to get. Passing in NULL indicates that the element is not associated with another element. |
| virtual DataElement* ModelServices::getElement | ( | const std::vector< std::string > & | designator, | |
| const std::string & | type | |||
| ) | const [pure virtual] |
Retrieves a data element.
| designator | The element designator for the data element to retrieve. | |
| type | The string name corresponding to the type of the data element to retrieve. If this is an empty string, an element of any type is retrieved. |
| virtual std::vector<DataElement*> ModelServices::getElements | ( | const std::string & | type | ) | const [pure virtual] |
Retrieves elements of a given type.
| type | The string name corresponding to the element type to retrieve. If an empty string is passed in, all elements in the model are retrieved. |
| virtual std::vector<DataElement*> ModelServices::getElements | ( | const DataElement * | pParent, | |
| const std::string & | type | |||
| ) | const [pure virtual] |
Retrieves elements with a given parent.
| pParent | The parent element for which all child elements should be retrieved. Passing in NULL retrieves all top-level elements. | |
| type | An optional type string for retreiving elements of a particular type from the given parent. If an empty string is passed in, all elements with the given parent are retrieved. |
| virtual std::vector<DataElement*> ModelServices::getElements | ( | const std::string & | filename, | |
| const std::string & | type | |||
| ) | const [pure virtual] |
Retrieves elements with a given file.
| filename | The filename for which all elements with the same filename should be retrieved. Passing in an empty string retrieves all elements that have no associated file. | |
| type | An optional type string for retreiving elements of a particular type within the given file. If an empty string is passed in, all elements within the given file are retrieved. |
| virtual std::vector<std::string> ModelServices::getElementNames | ( | const std::string & | type | ) | const [pure virtual] |
Retrieves the names of elements of a given type.
| type | The string name corresponding to the element type for which to retrieve the names. If an empty string is passed in, the names of all elements in the model are retrieved. |
| virtual std::vector<std::string> ModelServices::getElementNames | ( | const DataElement * | pParent, | |
| const std::string & | type | |||
| ) | const [pure virtual] |
Retrieves the names of elements with a given parent.
| pParent | The parent element for which the names of all child elements should be retrieved. Passing in NULL retrieves the names of all top-level elements. | |
| type | An optional type string for retreiving the names of elements of a particular type from the given parent. If an empty string is passed in, the names of all elements with the given parent are retrieved. |
| virtual std::vector<std::string> ModelServices::getElementNames | ( | const std::string & | filename, | |
| const std::string & | type | |||
| ) | const [pure virtual] |
Retrieves the names of elements with a given file.
| filename | The filename for which the names of all elements with the same filename should be retrieved. Passing in an empty string retrieves the name of all elements that have no associated file. | |
| type | An optional type string for retreiving the names of elements of a particular type within the given file. If an empty string is passed in, the names of all elements within the given file are retrieved. |
| virtual bool ModelServices::setElementName | ( | DataElement * | pElement, | |
| const std::string & | name | |||
| ) | [pure virtual] |
Renames a data element.
| pElement | The existing element in the session to rename. This method does nothing if NULL is passed in. | |
| name | The new name for the element. If an empty string is passed in, the element is not renamed. |
| virtual bool ModelServices::setElementParent | ( | DataElement * | pElement, | |
| DataElement * | pParent | |||
| ) | [pure virtual] |
Reparents a data element.
The classification settings of the reparented element will not be changed, i.e., they will not be set to the new parent's settings.
| pElement | The existing element in the session to reparent. This method does nothing if NULL is passed in. | |
| pParent | The new parent for the element. |
| virtual bool ModelServices::removeElement | ( | const DataElement * | pElement | ) | [pure virtual] |
Removes a data element from the session.
This method removes a data element from the session but does not delete it. To remove and delete the element, call the destroyElement() method instead.
| pElement | The data element to be removed. |
| virtual bool ModelServices::destroyElement | ( | DataElement * | pElement | ) | [pure virtual] |
Removes a data element from the session and deletes it.
This method removes a data element from the session and deletes it and all of its child elements. To remove the element without deleting it and its children, call the removeElement() method instead.
| pElement | The element to remove and delete, along with its child elements. This method does nothing if NULL is passed in. |
| virtual void ModelServices::clear | ( | ) | [pure virtual] |
Removes and destroys all elements in the session.
| virtual char* ModelServices::getMemoryBlock | ( | size_t | size | ) | [pure virtual] |
Allocates a large block of memory.
This method allocates a contiguous block of memory of a given size and returns a pointer to the memory block. This method can be used to create space for a dataset in the studio's memory space that it can be accessed when a plug-in has been unloaded.
NOTE: On a 64-bit platform, the maximum available bytes to allocate is 2^64, which is well over 18 million GB. On a 32-bit platform, the maximum available bytes to allocate is 4 GB.
| size | The size in bytes of the requested memory block. |
| virtual void ModelServices::deleteMemoryBlock | ( | char * | memory | ) | [pure virtual] |
Deletes a block of memory allocated by the studio.
This method is used to delete a block of memory created by the getMemoryBlock() method.
| memory | A pointer to the memory block to be deleted. |
| static double ModelServices::getDataValue | ( | EncodingType | type, | |
| const void * | pData, | |||
| int | iIndex | |||
| ) | [static] |
This static method retrieves an individual data value from a block of memory.
| type | The data type of the memory block. | |
| pData | A pointer to the block of memory from which to get the data value. | |
| iIndex | The index into the memory block for the data value. |
Definition at line 725 of file ModelServices.h.
| static double ModelServices::getDataValue | ( | EncodingType | type, | |
| const void * | pData, | |||
| ComplexComponent | component, | |||
| int | iIndex | |||
| ) | [static] |
This static method retrieves an individual data value from a block of memory.
| type | The data type of the memory block. | |
| pData | A pointer to the block of memory from which to get the data value. | |
| component | For complex data, this specifies the component of the complex data that should be returned. For non-complex data, this value is ignored. | |
| iIndex | The index into the memory block for the data value. |
Definition at line 750 of file ModelServices.h.
| static void ModelServices::getDataValue | ( | const T * | pData, | |
| ComplexComponent | component, | |||
| int | iIndex, | |||
| double & | dValue | |||
| ) | [static] |
Retrieves an individual data value from a block of memory independent of the data type.
This static method provides the same functionality as the corresponding virtual method, but can be used inside of other template methods. This can provide a significant performance improvement if getting numerous data values.
| pData | A pointer to the block of memory from which to get the data value. | |
| component | For complex data, this specifies the component of the complex data that should be returned. For non-complex data, this value is ignored. | |
| iIndex | The index into the memory block for the data value. | |
| dValue | Populated with the data value. |
Definition at line 779 of file ModelServices.h.
| static unsigned char ModelServices::getDataValue | ( | const unsigned char & | data, | |
| ComplexComponent | component | |||
| ) | [static] |
Provided for convenience for template methods, this method simply returns the given value.
| data | The data value from which to extract the complex component value. | |
| component | This value is ignored since the given data value is non-complex. |
Definition at line 797 of file ModelServices.h.
| static signed char ModelServices::getDataValue | ( | const signed char & | data, | |
| ComplexComponent | component | |||
| ) | [static] |
Provided for convenience for template methods, this method simply returns the given value.
| data | The data value from which to extract the complex component value. | |
| component | This value is ignored since the given data value is non-complex. |
Definition at line 812 of file ModelServices.h.
| static unsigned short ModelServices::getDataValue | ( | const unsigned short & | data, | |
| ComplexComponent | component | |||
| ) | [static] |
Provided for convenience for template methods, this method simply returns the given value.
| data | The data value from which to extract the complex component value. | |
| component | This value is ignored since the given data value is non-complex. |
Definition at line 827 of file ModelServices.h.
| static signed short ModelServices::getDataValue | ( | const signed short & | data, | |
| ComplexComponent | component | |||
| ) | [static] |
Provided for convenience for template methods, this method simply returns the given value.
| data | The data value from which to extract the complex component value. | |
| component | This value is ignored since the given data value is non-complex. |
Definition at line 842 of file ModelServices.h.
| static double ModelServices::getDataValue | ( | const IntegerComplex & | data, | |
| ComplexComponent | component | |||
| ) | [static] |
Returns a data value according to a given complex data component.
| data | The data value from which to extract the complex component value. | |
| component | For complex data, this specifies the component of the complex data whose value should be returned. |
Definition at line 858 of file ModelServices.h.
| static unsigned int ModelServices::getDataValue | ( | const unsigned int & | data, | |
| ComplexComponent | component | |||
| ) | [static] |
Provided for convenience for template methods, this method simply returns the given value.
| data | The data value from which to extract the complex component value. | |
| component | This value is ignored since the given data value is non-complex. |
Definition at line 873 of file ModelServices.h.
| static signed int ModelServices::getDataValue | ( | const signed int & | data, | |
| ComplexComponent | component | |||
| ) | [static] |
Provided for convenience for template methods, this method simply returns the given value.
| data | The data value from which to extract the complex component value. | |
| component | This value is ignored since the given data value is non-complex. |
Definition at line 888 of file ModelServices.h.
| static float ModelServices::getDataValue | ( | const float & | data, | |
| ComplexComponent | component | |||
| ) | [static] |
Provided for convenience for template methods, this method simply returns the given value.
| data | The data value from which to extract the complex component value. | |
| component | This value is ignored since the given data value is non-complex. |
Definition at line 903 of file ModelServices.h.
| static double ModelServices::getDataValue | ( | const FloatComplex & | data, | |
| ComplexComponent | component | |||
| ) | [static] |
Returns a data value according to a given complex data component.
| data | The data value from which to extract the complex component value. | |
| component | For complex data, this specifies the component of the complex data whose value should be returned. |
Definition at line 919 of file ModelServices.h.
| static double ModelServices::getDataValue | ( | const double & | data, | |
| ComplexComponent | component | |||
| ) | [static] |
Provided for convenience for template methods, this method simply returns the given value.
| data | The data value from which to extract the complex component value. | |
| component | This value is ignored since the given data value is non-complex. |
Definition at line 934 of file ModelServices.h.
| virtual bool ModelServices::isKindOfElement | ( | const std::string & | className, | |
| const std::string & | elementName | |||
| ) | const [pure virtual] |
Queries a element to see if it is a kind of another element.
This method check type compatibility between two data elements. This functionality is different than TypeAwareObject::isKindOf() in that only DataElement-derived classes are checked.
| className | The name of the DataElement-derived class to query. | |
| elementName | The DataElement-derived class name to check type compatibility. |
| virtual void ModelServices::getElementTypes | ( | const std::string & | className, | |
| std::vector< std::string > & | classList | |||
| ) | const [pure virtual] |
Returns a list of inherited data element class names for a given class name.
This method populates a vector with the class names of all inherited DataElement class types. The given class name is used as the initial class for populating the vector. For example, passing in "RasterElement" as a class name populates a vector with the "RasterElement" and "DataElement" strings.
| className | The data element class name for which to get all inherited element types. | |
| classList | This vector is populated with the class names of all inherited data element classes and the given class name. |
| virtual bool ModelServices::isKindOfDataDescriptor | ( | const std::string & | className, | |
| const std::string & | descriptorName | |||
| ) | const [pure virtual] |
Queries a data descriptor to see if it is a kind of another data descriptor.
This method check type compatibility between two data descriptors. This functionality is different than TypeAwareObject::isKindOf() in that only DataDescriptor-derived classes are checked.
| className | The name of the DataDescriptor-derived class to query. | |
| descriptorName | The DataDescriptor-derived class name to check type compatibility. |
| virtual void ModelServices::getDataDescriptorTypes | ( | const std::string & | className, | |
| std::vector< std::string > & | classList | |||
| ) | const [pure virtual] |
Returns a list of inherited data descriptor class names for a given class name.
This method populates a vector with the class names of all inherited DataDescriptor class types. The given class name is used as the initial class for populating the vector. For example, passing in "RasterDataDescriptor" as a class name populates a vector with the "RasterDataDescriptor" and "DataDescriptor" strings.
| className | The data descriptor class name for which to get all inherited descriptor types. | |
| classList | This vector is populated with the class names of all inherited data descriptor classes and the given class name. |
| virtual bool ModelServices::isKindOfFileDescriptor | ( | const std::string & | className, | |
| const std::string & | descriptorName | |||
| ) | const [pure virtual] |
Queries a file descriptor to see if it is a kind of another file descriptor.
This method check type compatibility between two file descriptors. This functionality is different than TypeAwareObject::isKindOf() in that only FileDescriptor-derived classes are checked.
| className | The name of the FileDescriptor-derived class to query. | |
| descriptorName | The FileDescriptor-derived class name to check type compatibility. |
| virtual void ModelServices::getFileDescriptorTypes | ( | const std::string & | className, | |
| std::vector< std::string > & | classList | |||
| ) | const [pure virtual] |
Returns a list of inherited file descriptor class names for a given class name.
This method populates a vector with the class names of all inherited FileDescriptor class types. The given class name is used as the initial class for populating the vector. For example, passing in "RasterFileDescriptor" as a class name populates a vector with the "RasterFileDescriptor" and "FileDescriptor", strings.
| className | The file descriptor class name for which to get all inherited descriptor types. | |
| classList | This vector is populated with the class names of all inherited file descriptor classes and the given class name. |
| Destination model_cast | ( | Source | pSourcePtr | ) | [related] |
Converts a pointer of one type to a pointer of another type.
This cast is provided as a convenience to directly cast from a DataElement as returned by ModelServices::getElement() to the custom AnyData object stored in an Any element. If the requested type is registered with ModelServices::addElementType() and stored in an Any element, this cast returns a pointer to the custom data type; otherwise this cast is simply a wrapper around a dynamic_cast.
| pSourcePtr | The pointer to convert to a pointer of the requested type. |
Definition at line 1070 of file ModelServices.h.