OpenCMISS-Zinc C++ API Documentation
Public Types | Public Member Functions | List of all members
OpenCMISS::Zinc::StreaminformationRegion Class Reference

A region-specific stream information object. More...

#include <streamregion.hpp>

Inheritance diagram for OpenCMISS::Zinc::StreaminformationRegion:
OpenCMISS::Zinc::Streaminformation

Public Types

enum  Attribute { ATTRIBUTE_INVALID = CMZN_STREAMINFORMATION_REGION_ATTRIBUTE_INVALID, ATTRIBUTE_TIME = CMZN_STREAMINFORMATION_REGION_ATTRIBUTE_TIME }
 
enum  FileFormat { FILE_FORMAT_INVALID = CMZN_STREAMINFORMATION_REGION_FILE_FORMAT_INVALID, FILE_FORMAT_AUTOMATIC = CMZN_STREAMINFORMATION_REGION_FILE_FORMAT_AUTOMATIC, FILE_FORMAT_EX = CMZN_STREAMINFORMATION_REGION_FILE_FORMAT_EX, FILE_FORMAT_FIELDML = CMZN_STREAMINFORMATION_REGION_FILE_FORMAT_FIELDML }
 
enum  RecursionMode { RECURSION_MODE_INVALID = CMZN_STREAMINFORMATION_REGION_RECURSION_MODE_INVALID, RECURSION_MODE_ON = CMZN_STREAMINFORMATION_REGION_RECURSION_MODE_ON, RECURSION_MODE_OFF = CMZN_STREAMINFORMATION_REGION_RECURSION_MODE_OFF }
 
- Public Types inherited from OpenCMISS::Zinc::Streaminformation
enum  DataCompressionType {
  DATA_COMPRESSION_TYPE_INVALID = CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_INVALID, DATA_COMPRESSION_TYPE_DEFAULT = CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_DEFAULT, DATA_COMPRESSION_TYPE_NONE = CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_NONE, DATA_COMPRESSION_TYPE_GZIP = CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_GZIP,
  DATA_COMPRESSION_TYPE_BZ2 = CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_BZIP2
}
 

Public Member Functions

 StreaminformationRegion (cmzn_streaminformation_region_id streaminformation_region_id)
 
bool isValid () const
 
cmzn_streaminformation_region_id getDerivedId () const
 
int hasAttribute (Attribute attribute)
 
double getAttributeReal (Attribute attribute)
 
int setAttributeReal (Attribute attribute, double value)
 
int hasResourceAttribute (const Streamresource &resource, Attribute attribute)
 
double getResourceAttributeReal (const Streamresource &resource, Attribute attribute)
 
int setResourceAttributeReal (const Streamresource &resource, Attribute attribute, double value)
 
FileFormat getFileFormat ()
 
int setFileFormat (FileFormat fileFormat)
 
Field::DomainTypes getResourceDomainTypes (const Streamresource &resource)
 
int setResourceDomainTypes (const Streamresource &resource, Field::DomainTypes domainTypes)
 
int setFieldNames (int numberOfNames, const char **fieldNames)
 
int setResourceFieldNames (const Streamresource &resource, int numberOfNames, const char **fieldNames)
 
int setRecursionMode (RecursionMode recursionMode)
 
int setResourceRecursionMode (const Streamresource &resource, RecursionMode recursionMode)
 
char * getResourceGroupName (const Streamresource &resource)
 
int setResourceGroupName (const Streamresource &resource, const char *groupName)
 
- Public Member Functions inherited from OpenCMISS::Zinc::Streaminformation
 Streaminformation (cmzn_streaminformation_id in_streaminformation_id)
 
 Streaminformation (const Streaminformation &streamInformation)
 
Streaminformationoperator= (const Streaminformation &streamInformation)
 
bool isValid () const
 
cmzn_streaminformation_id getId () const
 
StreamresourceFile createStreamresourceFile (const char *file_name)
 
StreamresourceMemory createStreamresourceMemory ()
 
StreamresourceMemory createStreamresourceMemoryBuffer (const void *buffer, unsigned int buffer_length)
 
StreamresourceMemory createStreamresourceMemoryBufferCopy (const void *buffer, unsigned int buffer_length)
 
enum DataCompressionType getResourceDataCompressionType (const Streamresource &resource)
 
int setResourceDataCompressionType (const Streamresource &resource, DataCompressionType dataCompressionType)
 
enum DataCompressionType getDataCompressionType ()
 
int setDataCompressionType (DataCompressionType dataCompressionType)
 
StreaminformationImage castImage ()
 
StreaminformationRegion castRegion ()
 
StreaminformationScene castScene ()
 

Additional Inherited Members

- Protected Attributes inherited from OpenCMISS::Zinc::Streaminformation
cmzn_streaminformation_id id
 

Detailed Description

A region-specific stream information object.

A region-specific stream information object, used to specify one or more model files/resources for a region to read from or write to, with attributes specified for them either globally or per-resource.

See also
Region::createStreaminformationRegion

Member Enumeration Documentation

Enumeration of attributes that can be set by generic stream information region methods.

Enumerator
ATTRIBUTE_INVALID 

Unspecified attribute

ATTRIBUTE_TIME 

Attribute used to specify at what time the stream resource(s) to be reading in or writing to.

Describes the format for serialisation of region field data.

See also
StreaminformationRegion::setFileFormat
Enumerator
FILE_FORMAT_INVALID 

Invalid file format

FILE_FORMAT_AUTOMATIC 

Automatically choose file format. This is the default option. On read: determine from internal characteristics On write: determine from file extension (case insensitive): .ex* -> EX format; .fieldml -> FieldML

FILE_FORMAT_EX 

Zinc/Cmgui EX format

FILE_FORMAT_FIELDML 

Latest supported FieldML format

Enumerator
RECURSION_MODE_INVALID 

Invalid recursion mode

RECURSION_MODE_ON 

Region will be exported recursively

RECURSION_MODE_OFF 

Region will not be exported recursively

Member Function Documentation

double OpenCMISS::Zinc::StreaminformationRegion::getAttributeReal ( Attribute  attribute)
inline

Get a real value of an attribute of streaminformation.

Parameters
attributeThe identifier of the real attribute to get.
Returns
Value of the attribute.
cmzn_streaminformation_region_id OpenCMISS::Zinc::StreaminformationRegion::getDerivedId ( ) const
inline

Return the C handle of the derived StreaminformationRegion object.

Returns
C handle of the derived StreaminformationRegion if this objects is valid, 0 otherwise.
FileFormat OpenCMISS::Zinc::StreaminformationRegion::getFileFormat ( )
inline

Gets the format for region field data to be read/written using this stream information.

Returns
The file format, or FILE_FORMAT_INVALID on failure.
double OpenCMISS::Zinc::StreaminformationRegion::getResourceAttributeReal ( const Streamresource resource,
Attribute  attribute 
)
inline

Get a real value of an attribute of a stream in streaminformation.

Parameters
resourceHandle to the stream resource.
attributeThe identifier of the real attribute to get.
Returns
Value of the attribute.
Field::DomainTypes OpenCMISS::Zinc::StreaminformationRegion::getResourceDomainTypes ( const Streamresource resource)
inline

Get the specified domain types for a stream resource in streaminformation.

Parameters
resourceHandle to the stream resource.
Returns
Bitmasks for specified domain types for stream resource, CMZN_FIELD_DOMAIN_TYPE_INVALID if failed or unset
char* OpenCMISS::Zinc::StreaminformationRegion::getResourceGroupName ( const Streamresource resource)
inline

Use this function to get the group name set for stream resource.

Parameters
resourceHandle to the stream resource.
Returns
Allocated string if group name is successfully returned, any other value if failed.
int OpenCMISS::Zinc::StreaminformationRegion::hasAttribute ( Attribute  attribute)
inline

Check either an attribute of streaminformation has been set or not.

Parameters
attributeThe identifier of the real attribute to get.
Returns
1 if attribute has been set.
int OpenCMISS::Zinc::StreaminformationRegion::hasResourceAttribute ( const Streamresource resource,
Attribute  attribute 
)
inline

Check either an attribute of a stream in streaminformation has been set or not.

Parameters
resourceHandle to the stream resource.
attributeThe identifier of the real attribute to get.
Returns
1 if attribute has been set.
bool OpenCMISS::Zinc::StreaminformationRegion::isValid ( ) const
inline

Check if this is a valid StreaminformationRegion object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::StreaminformationRegion::setAttributeReal ( Attribute  attribute,
double  value 
)
inline

Set a double attribute of the region stream information valid for all resources unless overridden for individual resources.

Parameters
attributeThe identifier of the double attribute to set.
valueThe new value for the attribute.
Returns
status OpenCMISS::Zinc::OK if attribute successfully set, any other value if failed or attribute not valid or unable to be set for this cmzn_streaminformation_region.
int OpenCMISS::Zinc::StreaminformationRegion::setFieldNames ( int  numberOfNames,
const char **  fieldNames 
)
inline

Use this function to choose the fields to be read/written by specifying name of the fields, this will affect all resources in this streaminformation unless field names have been set for individual resource.

Parameters
numberOfNamesNumber of field names provided.
fieldNamesThe identifier of the double attribute to set.
Returns
status OpenCMISS::Zinc::OK if successfully set the field names, any other value on failure.
int OpenCMISS::Zinc::StreaminformationRegion::setFileFormat ( FileFormat  fileFormat)
inline

Specifies the format for region field data to be read/written using this stream information. Applies to all resources managed by stream information.

Parameters
fileFormatThe region stream file format.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::StreaminformationRegion::setRecursionMode ( RecursionMode  recursionMode)
inline

Use this function to select either streaminformation should export the region and its children or just the region itself. This applies to all streaminformation resources unless this mode is set for individuals resources.

Parameters
recursionModeRecursion mode to be set for this streaminformation.
Returns
status OpenCMISS::Zinc::OK if recursion mode is successfully set, any other value if failed.
int OpenCMISS::Zinc::StreaminformationRegion::setResourceAttributeReal ( const Streamresource resource,
Attribute  attribute,
double  value 
)
inline

Set a double attribute for a resource in the region stream information.

Parameters
resourceHandle to the stream resource.
attributeThe identifier of the double attribute to set.
valueThe new value for the attribute.
Returns
status OpenCMISS::Zinc::OK if attribute successfully set, any other value if failed or attribute not valid or unable to be set for this cmzn_streaminformation_region.
int OpenCMISS::Zinc::StreaminformationRegion::setResourceDomainTypes ( const Streamresource resource,
Field::DomainTypes  domainTypes 
)
inline

Set the domain types to be exported from the region this stream information is created in. The current default setting will output all domain types in region. On import, the domain type also specifies nodesets without a specified domain type in exformat file to be imported as nodes or datapoints domain. If unset, unspecified nodesets will be imported as nodes.

Parameters
resourceHandle to the stream resource.
domainTypesBitmasks for the domain type to be set for output. It currently supports the following domains: CMZN_FIELD_DOMAIN_TYPE_POINT - Only output the region name if this is the only bit set CMZN_FIELD_DOMAIN_TYPE_NODES - Enable output of nodes CMZN_FIELD_DOMAIN_TYPE_DATAPOINTS - Enable output of datapoints CMZN_FIELD_DOMAIN_TYPE_MESH1D - Enable output of 1D mesh CMZN_FIELD_DOMAIN_TYPE_MESH2D - Enable output of 2D mesh CMZN_FIELD_DOMAIN_TYPE_MESH3D - Enable output of 3D mesh CMZN_FIELD_DOMAIN_TYPE_MESH_HIGHEST_DIMENSION - Enable output of mesh with highest dimension possible
Returns
status OpenCMISS::Zinc::OK if domain types successfully set, any other value if failed or domain type not valid or unable to be set for this cmzn_streaminformation_region.
int OpenCMISS::Zinc::StreaminformationRegion::setResourceFieldNames ( const Streamresource resource,
int  numberOfNames,
const char **  fieldNames 
)
inline

Use this function to choose the fields to be read/written by specifying name of the fields for this resource.

Parameters
resourceHandle to the stream resource.
numberOfNamesNumber of field names provided.
fieldNamesThe identifier of the double attribute to set.
Returns
status OpenCMISS::Zinc::OK if field names are successfully set, any other value if failed or attribute not valid or unable to be set for this cmzn_streaminformation_region.
int OpenCMISS::Zinc::StreaminformationRegion::setResourceGroupName ( const Streamresource resource,
const char *  groupName 
)
inline

Use this function to set the group to be exported. If a group field with the provided name is found in the relevant region(s), the fields information in the group will be exported. If group name is NULL (default), all field informations will be exported.

Parameters
resourceHandle to the stream resource.
groupNameGroup name to be set for this streaminformation.
Returns
status OpenCMISS::Zinc::OK if group name is successfully set, any other value if failed.
int OpenCMISS::Zinc::StreaminformationRegion::setResourceRecursionMode ( const Streamresource resource,
RecursionMode  recursionMode 
)
inline

Use this function to select either streaminformation resource should export the region and its children or just the region itself.

Parameters
resourceHandle to the stream resource.
recursionModeRecursion mode to be set for this streaminformation.
Returns
status OpenCMISS::Zinc::OK if recursion mode is successfully set, any other value if failed.

The documentation for this class was generated from the following file: