Base type listing resources and options for stream I/O.
More...
#include <stream.hpp>
|
cmzn_streaminformation_id | id |
|
Base type listing resources and options for stream I/O.
Base stream information type. The stream information maintains, creates and adds details to streamresources for reading from or writing to external resources. Users can create a type-specific stream information for each object with read and write functionality, currently image fields and region.
- See also
- FieldImage::createStreaminformationImage
-
Region::createStreaminformationRegion
Describes data compression scheme used in a stream resource.
Enumerator |
---|
DATA_COMPRESSION_TYPE_INVALID |
Unspecified data compression type
|
DATA_COMPRESSION_TYPE_DEFAULT |
default data compression This is the default compression for streamresource. When compression type for streamresource is set to default, the DATA_COMPRESSION_TYPE set on the owning streaminformation will be used. This type cannot be set for streaminformation.
|
DATA_COMPRESSION_TYPE_NONE |
No data compression This is the default compression for streaminformation. This specifies the resource(s) to not have any type of compression.
|
DATA_COMPRESSION_TYPE_GZIP |
Gzip data compression This specifies the resource(s) is compressed using gzip. This mode is supported in all region resource(s) and analyze image format. Analyze image format expects the resource(s) in a gzip compressed tar containing an analyze header file and analyze image file.
|
DATA_COMPRESSION_TYPE_BZ2 |
Bzip2 data compression This specifies the resource(s) is compressed using bzip2. This mode is supported in all region resource(s)and analyze image format. Analyze image format expects the resource(s) in a bzip2 compressed tar containing analyze header file and analyze image file.
|
If the streaminformation is of image type, then this function returns the derived image stream information handle.
- Returns
- Handle to derived stream information image, or NULL/invalid handle if wrong type or failed.
If the streaminformation is of region type, then this function returns the region specific handle.
- Returns
- Handle to derived stream information region, or NULL/invalid handle if wrong type or failed.
If the streaminformation is of scene type, then this function returns the derived scene stream information handle.
- Returns
- Handle to derived stream information scene, or NULL/invalid handle if wrong type or failed.
StreamresourceFile OpenCMISS::Zinc::Streaminformation::createStreamresourceFile |
( |
const char * |
file_name | ) |
|
|
inline |
Creates a stream resource of memory type with no memory buffer, the memory buffer storage in this object is reserved for write or export function calls with the stream information in the future. To input an memory buffer for reading please see cmzn_streaminformation_create_streamresource_memory_buffer.
- See also
- FieldImage::write
-
Region::write
-
FieldImage::read
-
Region::read
-
Streamresource::castMemory
stream resource.
- Returns
- Handle to new stream resource, or NULL/invalid handle on failure.
StreamresourceMemory OpenCMISS::Zinc::Streaminformation::createStreamresourceMemoryBuffer |
( |
const void * |
buffer, |
|
|
unsigned int |
buffer_length |
|
) |
| |
|
inline |
Creates a stream resource of memory type for the buffer of the supplied size and at the supplied buffer pointer. The resource can then be read into a Zinc object. This function does not copy the buffer, user is responsible for the lifetime of the buffer. Please make sure the buffer is valid when reading the stream information.
- See also
- FieldImage::write
-
Region::write
-
FieldImage::read
-
Region::read
-
Streamresource::castMemory
stream resource.
- Parameters
-
buffer | Pointer to the memory buffer |
buffer_length | length of the buffer |
- Returns
- Handle to new stream resource, or NULL/invalid handle on failure.
StreamresourceMemory OpenCMISS::Zinc::Streaminformation::createStreamresourceMemoryBufferCopy |
( |
const void * |
buffer, |
|
|
unsigned int |
buffer_length |
|
) |
| |
|
inline |
Creates a stream resource of memory type for the buffer of the supplied size and at the supplied buffer pointer. The resource can then be read into a Zinc object. This function copies the buffer.
- See also
- FieldImage::write
-
Region::write
-
FieldImage::read
-
Region::read
-
Streamresource::castMemory
stream resource.
- Parameters
-
buffer | Pointer to the memory buffer |
buffer_length | length of the buffer |
- Returns
- Handle to new stream resource, or NULL/invalid handle on failure.
Get the specified data compression for the stream resources in streaminformation.
- Returns
- enum for specified data_compression_type for stream resource, CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_INVALID if failed or unset
cmzn_streaminformation_id OpenCMISS::Zinc::Streaminformation::getId |
( |
| ) |
const |
|
inline |
Get the specified data compression for a specified streamresource in streaminformation.
- Parameters
-
resource | Handle to the stream resource. |
- Returns
- enum for specified data_compression_type for stream resource, CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_INVALID if failed or unset
bool OpenCMISS::Zinc::Streaminformation::isValid |
( |
| ) |
const |
|
inline |
Check if this is a valid Streaminformation object.
- Returns
- Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Streaminformation::setDataCompressionType |
( |
DataCompressionType |
dataCompressionType | ) |
|
|
inline |
Specify the data compression of the streamresource in the streaminformation.
- Parameters
-
dataCompressionType | enum to indicate the compression used in the resources in the streaminformation |
- Returns
- status OpenCMISS::Zinc::OK if data compression successfully set, any other value if failed or data_compression_type type is not valid or unable to be set for this cmzn_streaminformation.
Specify the data compression of this streamresource and it will override the one specified in the owning streaminformation.
- Parameters
-
resource | Handle to the stream resource. |
dataCompressionType | enum to indicate the compression used in the resources in the streaminformation |
- Returns
- status OpenCMISS::Zinc::OK if domain types successfully set, any other value if failed or domain data_compression_type not valid or unable to be set for this cmzn_streaminformation_resource.
The documentation for this class was generated from the following files: