HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_AIFSharedStringTuple::StringBuffer Class Reference

Temporary container to hold references to multiple strings. More...

#include <GA_AIFSharedStringTuple.h>

Public Member Functions

 StringBuffer (GA_Attribute *attribute=NULL, const GA_AIFSharedStringTuple *aif=NULL)
 
 StringBuffer (const StringBuffer &src)
 
 ~StringBuffer ()
 
StringBufferoperator= (const StringBuffer &src)
 
GA_Size entries () const
 Return number of strings referenced in the string buffer. More...
 
GA_StringIndexType append (const char *string)
 
GA_StringIndexType getStringIndex (GA_Size i) const
 
const char * getString (GA_Size i) const
 
void clear ()
 Clear references to all strings contained in the buffer. More...
 

Detailed Description

Temporary container to hold references to multiple strings.

In some cases, it's more expedient to add multiple strings to the attribute, and then assign the string values after the fact. This class is similar to the GA_AIFBlob::BlobBuffer class, but is specialized for shared string attributes.

Definition at line 319 of file GA_AIFSharedStringTuple.h.

Constructor & Destructor Documentation

GA_AIFSharedStringTuple::StringBuffer::StringBuffer ( GA_Attribute attribute = NULL,
const GA_AIFSharedStringTuple aif = NULL 
)
GA_AIFSharedStringTuple::StringBuffer::StringBuffer ( const StringBuffer src)
inline

Definition at line 324 of file GA_AIFSharedStringTuple.h.

GA_AIFSharedStringTuple::StringBuffer::~StringBuffer ( )
inline

Definition at line 330 of file GA_AIFSharedStringTuple.h.

Member Function Documentation

GA_StringIndexType GA_AIFSharedStringTuple::StringBuffer::append ( const char *  string)

Add a string to the attribute. Returns the handle of the string in the attribute (not the string's index in the buffer).

void GA_AIFSharedStringTuple::StringBuffer::clear ( )

Clear references to all strings contained in the buffer.

GA_Size GA_AIFSharedStringTuple::StringBuffer::entries ( ) const
inline

Return number of strings referenced in the string buffer.

Definition at line 338 of file GA_AIFSharedStringTuple.h.

const char* GA_AIFSharedStringTuple::StringBuffer::getString ( GA_Size  i) const

Return a string handle from the buffer. The index refers to the buffer index (not the string handle).

GA_StringIndexType GA_AIFSharedStringTuple::StringBuffer::getStringIndex ( GA_Size  i) const

Return the string index from the buffer. The index refers to the buffer index (not the string handle).

StringBuffer& GA_AIFSharedStringTuple::StringBuffer::operator= ( const StringBuffer src)

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