cheshirekow  v0.1.0
fontconfig::ObjectTypeList Class Reference

utility class for building a static list of ObjectTypes, replaces static allocation of a list of FcObjectType objects More...

#include <cpp_fontconfig/name.h>

Classes

class  BuildToken
 
class  Item
 

Public Member Functions

void destroy ()
 destroy underlying data More...
 
int get_nItems () const
 return the number of objects More...
 
FcObjectType * get_ptr ()
 return the c-array of objects More...
 
const FcObjectType * get_ptr () const
 return a const c-array of objects More...
 
 ObjectTypeList (BuildToken &token)
 construct an object from a token More...
 
 ObjectTypeList (const ObjectTypeList &other)
 copy a list More...
 

Static Public Member Functions

static Item create ()
 creates a new Object type list, and returns an item which points to it More...
 

Private Member Functions

 ObjectTypeList ()
 private constructor, use ObjectTypeList::create() instead More...
 

Private Attributes

int m_nItems
 number of items More...
 
FcObjectType * m_ptr
 array of objects More...
 

Static Private Attributes

static BuildToken sm_seed
 

Detailed Description

utility class for building a static list of ObjectTypes, replaces static allocation of a list of FcObjectType objects

Example usage:

( "ObjectA", type::Integer )
( "ObjectB", type::String )
( "ObjectC", type::Double )
();
Note
an ObjectTypeList is not copyable or publicly constructable. It can only be constructed in the manner of the above example. We take advantage of this by setting m_selfDestruct of the list returned by ObjectTypeList::create() to false, which means that the m_selfDestruct bit of the created list is true

Definition at line 58 of file name.h.

Constructor & Destructor Documentation

fontconfig::ObjectTypeList::ObjectTypeList ( )
private

private constructor, use ObjectTypeList::create() instead

fontconfig::ObjectTypeList::ObjectTypeList ( BuildToken token)

construct an object from a token

fontconfig::ObjectTypeList::ObjectTypeList ( const ObjectTypeList other)

copy a list

Member Function Documentation

static Item fontconfig::ObjectTypeList::create ( )
static

creates a new Object type list, and returns an item which points to it

void fontconfig::ObjectTypeList::destroy ( )

destroy underlying data

int fontconfig::ObjectTypeList::get_nItems ( ) const

return the number of objects

FcObjectType* fontconfig::ObjectTypeList::get_ptr ( )

return the c-array of objects

const FcObjectType* fontconfig::ObjectTypeList::get_ptr ( ) const

return a const c-array of objects

Member Data Documentation

int fontconfig::ObjectTypeList::m_nItems
private

number of items

Definition at line 66 of file name.h.

FcObjectType* fontconfig::ObjectTypeList::m_ptr
private

array of objects

Definition at line 62 of file name.h.

BuildToken fontconfig::ObjectTypeList::sm_seed
staticprivate

Definition at line 68 of file name.h.


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