OpenCMISS-Zinc C++ API Documentation
Public Member Functions | Protected Attributes | List of all members
OpenCMISS::Zinc::Streamresource Class Reference

A description of a resource for reading from or writing to. More...

#include <stream.hpp>

Inheritance diagram for OpenCMISS::Zinc::Streamresource:
OpenCMISS::Zinc::StreamresourceFile OpenCMISS::Zinc::StreamresourceMemory

Public Member Functions

 Streamresource (cmzn_streamresource_id in_streamresource_id)
 
 Streamresource (const Streamresource &streamResource)
 
Streamresourceoperator= (const Streamresource &streamResource)
 
bool isValid () const
 
cmzn_streamresource_id getId () const
 
StreamresourceFile castFile ()
 
StreamresourceMemory castMemory ()
 

Protected Attributes

cmzn_streamresource_id id
 

Detailed Description

A description of a resource for reading from or writing to.

A description of a resource for reading from or writing to, such as a file or memory buffer. These are created through the stream information object.

See also
Streaminformation
StreamresourceFile
StreamresourceMemory
Streaminformation::createStreamresourceFile
Streaminformation::createStreamresourceMemory
Streaminformation::createStreamresourceMemory_buffer
Streaminformation::createStreamresourceMemory_buffer_copy

Member Function Documentation

StreamresourceFile OpenCMISS::Zinc::Streamresource::castFile ( )
inline

If the stream resource is of file type, then this function returns the derived file stream resource handle.

Returns
Handle to derived file stream resource, or NULL/invalid handle if wrong type or failed.
StreamresourceMemory OpenCMISS::Zinc::Streamresource::castMemory ( )
inline

If the stream resource is of memory type, then this function returns the derived memory stream resource handle.

See also
StreamresourceMemory::getBuffer
StreamresourceMemory::getBuffer_copy
Returns
Handle to derived memory stream resource, or NULL/invalid handle if wrong type or failed.
cmzn_streamresource_id OpenCMISS::Zinc::Streamresource::getId ( ) const
inline

Return the C handle of the Streamresource object.

Returns
C handle of Streamresource if this objects is valid, 0 otherwise.
bool OpenCMISS::Zinc::Streamresource::isValid ( ) const
inline

Check if this is a valid Streamresource object.

Returns
Status True if object is valid, false otherwise.

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