Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

VXIContentHolder Class Reference
[Type library]

#include <VXIvalue.h>

List of all members.


Detailed Description

C++ wrapper class that makes it easier to work with VXIContent.


Public Member Functions

 VXIContentHolder ()
 VXIContentHolder (VXIContent *c)
 Takes ownership of an existing VXIContent.
virtual ~VXIContentHolder ()
 Destroys the contained VXIContent.
const VXIbyteGetContent ()
 Returns the VXIContent content.
const VXIcharGetType ()
 Returns the VXIContent type.
VXIulong GetSize ()
 Returns the VXIContent size.
const VXIContent * GetValue ()
 Returns the internal map.
VXIContent * Release (void)
 Give up ownership of the contained VXIContent.
bool Create (const VXIchar *contentType, VXIbyte *content, VXIulong contentSizeBytes, void(*Destroy)(VXIbyte **content, void *userData), void *userData)
 Creates a new contained VXIContent, destroying the current content if needed.
void Acquire (VXIContent *content)
 Acquires an existing VXIContent, destroying the contained content if needed.


Constructor & Destructor Documentation

VXIContentHolder::VXIContentHolder  )  [inline]
 

VXIContentHolder::VXIContentHolder VXIContent *  c  )  [inline]
 

Takes ownership of an existing VXIContent.

Parameters:
c An existing VXIContent.

virtual VXIContentHolder::~VXIContentHolder  )  [inline, virtual]
 

Destroys the contained VXIContent.


Member Function Documentation

void VXIContentHolder::Acquire VXIContent *  content  )  [inline]
 

Acquires an existing VXIContent, destroying the contained content if needed.

bool VXIContentHolder::Create const VXIchar contentType,
VXIbyte content,
VXIulong  contentSizeBytes,
void(*)(VXIbyte **content, void *userData)  Destroy,
void *  userData
[inline]
 

Creates a new contained VXIContent, destroying the current content if needed.

Parameters:
contentType MIME content type for the data
content Data to store, this pointer will merely be copied (no deep copy of the data will be done) so this pointer must remain valid until the Destroy function is called.
contentSizeBytes Size of the data, in bytes
Destroy Destructor called to release the data when no longer needed. Since this construction merely copies the pointer, this is mandatory.
userData Optional user data pointer passed to destroy, typically used to hold a pointer to some larger data structure that contains the content so that larger data structure can be destroyed when the content is no longer required.

const VXIbyte* VXIContentHolder::GetContent  )  [inline]
 

Returns the VXIContent content.

Same as would be returned by VXIContentCreate.

VXIulong VXIContentHolder::GetSize  )  [inline]
 

Returns the VXIContent size.

Same as would be returned by VXIContentCreate.

const VXIchar* VXIContentHolder::GetType  )  [inline]
 

Returns the VXIContent type.

Same as would be returned by VXIContentCreate.

const VXIContent* VXIContentHolder::GetValue  )  [inline]
 

Returns the internal map.

VXIContent* VXIContentHolder::Release void   )  [inline]
 

Give up ownership of the contained VXIContent.

This does not destroy the contained VXIContent. Rather, a a pointer is returned, and it is the callers responsibility to destroy the map with a call to VXIContentDestroy.

Returns:
The contained VXIContent.


The documentation for this class was generated from the following file:
Generated on Wed Jun 1 12:50:19 2005 for OpenVXI by  doxygen 1.4.2