Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_PropertyList::BinaryData Class Reference

Inheritance diagram for CP_PropertyList::BinaryData:

CP_PropertyList::Node CP_CFMutableObject< CFDataRef, CFMutableDataRef > CP_M_RefCounted List of all members.

Node members that need overloading

virtual NodeType_t NodeType () const throw ()
virtual void PrintToLog (CP_LogFile &inLogFile, SInt32 inLevel=0, SInt32 inIndentLevel=0) const
virtual CFTypeRef GetNodeCFRef () const
static BinaryDataFromXMLData (CP_InStream &inXMLDataStream)

Public Member Functions

BinaryDataMakeMutable () const
 Make a mutable binary data object with the same contents.
virtual void WriteXMLData (CP_OutStream &inXMLDataStream) const
Constructor/Destructor
 BinaryData ()
 BinaryData (const void *inBuffer, UInt32 inBufferSize, bool inMutable=false)
 BinaryData (const BinaryData &inSrc)
 BinaryData (CFDataRef inDataRef, bool inRetain=true)
virtual ~BinaryData () throw ()
immutable operations
Return byte size of data.

UInt32 GetDataSize () const
const void * GetDataPtr () const
 Return an immutable pointer to the data.
UInt32 CopyBytes (void *inBuffer, UInt32 inByteCount, UInt32 inStartOffset=0) const
 Copy the data into the specified buffer.
mutable members (will/can modify data)
Get a mutable pointer to the data.

void * GetMutableDataPtr ()
void SetDataSize (UInt32 inNewDataSize)
 Change the byte size of the data.
void IncreaseDataSize (UInt32 inExtraSize)
 Increase the byte size of the data, filling with zeroes.
void AppendBytes (const void *inBuffer, UInt32 inByteCount)
void ReplaceBytes (const void *inBuffer, UInt32 inByteCount, UInt32 inStartOffset, UInt32 inBytesToReplace)
void DeleteBytes (UInt32 inStartOffset, UInt32 inByteCount)

Static Public Member Functions

static NodeFromXMLData (CP_InStream &inXMLDataStream, NodeType_t inExpectedNodeType=NodeType_Any)
static NodeCreateNodeForCFObject (CFTypeRef inObject)

Private Member Functions

CFMutableDataRef GetMutableCFRef ()
 operator TMutableCFRef ()
void AttachRefMutable (CFMutableDataRefinMutableRef, bool inRetain)
void AttachRef (CFDataRefinRef, bool inRetain)
CFMutableDataRef DetachRefMutable ()
void MakeMutable ()
CFMutableDataRef MutableCopy (CFDataRefinCFRef)
CFDataRef DetachRef ()
CFDataRef GetCFRef () const
bool IsValid () const

Private Attributes

CFDataRef fCFObject

Constructor & Destructor Documentation

CP_PropertyList::BinaryData::BinaryData  ) 
 

CP_PropertyList::BinaryData::BinaryData const void *  inBuffer,
UInt32  inBufferSize,
bool  inMutable = false
[explicit]
 

CP_PropertyList::BinaryData::BinaryData const BinaryData inSrc  ) 
 

CP_PropertyList::BinaryData::BinaryData CFDataRef  inDataRef,
bool  inRetain = true
[explicit]
 

CP_PropertyList::BinaryData::~BinaryData  )  throw () [virtual]
 


Member Function Documentation

UInt32 CP_PropertyList::BinaryData::GetDataSize  )  const
 

const void * CP_PropertyList::BinaryData::GetDataPtr  )  const
 

UInt32 CP_PropertyList::BinaryData::CopyBytes void *  inBuffer,
UInt32  inByteCount,
UInt32  inStartOffset = 0
const
 

void * CP_PropertyList::BinaryData::GetMutableDataPtr  ) 
 

void CP_PropertyList::BinaryData::SetDataSize UInt32  inNewDataSize  ) 
 

void CP_PropertyList::BinaryData::IncreaseDataSize UInt32  inExtraSize  ) 
 

void CP_PropertyList::BinaryData::AppendBytes const void *  inBuffer,
UInt32  inByteCount
 

void CP_PropertyList::BinaryData::ReplaceBytes const void *  inBuffer,
UInt32  inByteCount,
UInt32  inStartOffset,
UInt32  inBytesToReplace
 

void CP_PropertyList::BinaryData::DeleteBytes UInt32  inStartOffset,
UInt32  inByteCount
 

BinaryData * CP_PropertyList::BinaryData::MakeMutable  )  const
 

Returns a mutable binary data object with the same contents as this object. It's up to the implementation to implement some copy-on-write mechanism, so in general, you shouldn neiter assume to get back the same object, nor assume it's a new object...
In any event, you don't need to release the object you get. If you want to hold on to the object for longer, you'll have to retain it (see CP_M_RefCounted::AddReference), otherwise it may go away at autorelease pool release time.

Exceptions:
none 
Returns:
A mutable binary data object with the same contents as this binary data object.

NodeType_t CP_PropertyList::BinaryData::NodeType  )  const throw () [virtual]
 

Implements CP_PropertyList::Node.

BinaryData * CP_PropertyList::BinaryData::FromXMLData CP_InStream inXMLDataStream  )  [static]
 

void CP_PropertyList::BinaryData::PrintToLog CP_LogFile inLogFile,
SInt32  inLevel = 0,
SInt32  inIndentLevel = 0
const [virtual]
 

Implements CP_PropertyList::Node.

virtual CFTypeRef CP_PropertyList::BinaryData::GetNodeCFRef  )  const [virtual]
 

Implements CP_PropertyList::Node.

void CP_PropertyList::Node::WriteXMLData CP_OutStream inXMLDataStream  )  const [virtual, inherited]
 

Node * CP_PropertyList::Node::FromXMLData CP_InStream inXMLDataStream,
NodeType_t  inExpectedNodeType = NodeType_Any
[static, inherited]
 

static Node* CP_PropertyList::Node::CreateNodeForCFObject CFTypeRef  inObject  )  [static, inherited]
 

UInt32 CP_M_RefCounted::AddReference  )  const [inherited]
 

Add a reference to our object, returning the new reference count.

Exceptions:
none 
Returns:
UInt32 const Returns the new reference count.

UInt32 CP_M_RefCounted::RemoveReference  )  const [inherited]
 

Remove a reference to our object, returning the new reference count. If the count is 0, then this object is also deleted, and 0 is returned.

Exceptions:
none 
Returns:
UInt32 const Returns the new reference count.

void CP_M_RefCounted::Autorelease  )  const [inherited]
 

Add the object to the topmost auto-release pool. This will ensure that the object is eventually released.

See also:
CP_AutoReleasePool
Exceptions:
none 
Returns:
void

UInt32 CP_M_RefCounted::GetRefCount  )  const [inherited]
 

Returns the current ref count.

Exceptions:
none 
Returns:
UInt32 The current referencce count.

CFMutableDataRef CP_CFMutableObject< CFDataRef , CFMutableDataRef >::GetMutableCFRef  )  [inherited]
 

Returns a mutable CFRef for this object. If the object is not mutable already, then it is first made mutable before returning the CFRef.

Exceptions:
none 

CP_CFMutableObject< CFDataRef , CFMutableDataRef >::operator CFMutableDataRef  )  [inherited]
 

operator TMutableCFRef to return the mutable CFRef object for this class.

Exceptions:
none 
Returns:
CFMutableCFRef The mutable CFRef object for ths class.

void CP_CFMutableObject< CFDataRef , CFMutableDataRef >::AttachRefMutable CFMutableDataRef   inMutableRef,
bool  inRetain
[inherited]
 

Attach a reference to the passed in CFRef.

Parameters:
inMutableRef The mutable ref object to attach the reference to.
inRetain Flag to indicate if we retain this object.
Exceptions:
none 

void CP_CFMutableObject< CFDataRef , CFMutableDataRef >::AttachRef CFDataRef   inRef,
bool  inRetain
[inherited]
 

Attach a reference to the passed in CFRef.

Parameters:
refToAttach The object to attach the reference to.
inRetain Flag to indicate if we retain this object.
Exceptions:
none 

Reimplemented from CP_CFObject< CFDataRef >.

CFMutableDataRef CP_CFMutableObject< CFDataRef , CFMutableDataRef >::DetachRefMutable  )  [inherited]
 

Detach a reference to the CFRef maintained by this object. If the object is not mutable, it is first made mutable.

Exceptions:
none 

void CP_CFMutableObject< CFDataRef , CFMutableDataRef >::MakeMutable  )  [protected, inherited]
 

Turns this object we are storing into a mutable version.

Exceptions:
none 

CFMutableDataRef CP_CFMutableObject< CFDataRef , CFMutableDataRef >::MutableCopy CFDataRef   inCFRef  )  [protected, inherited]
 

CFDataRef CP_CFObject< CFDataRef >::DetachRef  )  [inherited]
 

CFDataRef CP_CFObject< CFDataRef >::GetCFRef  )  const [inherited]
 

bool CP_CFObject< CFDataRef >::IsValid  )  const [inherited]
 


Member Data Documentation

CFDataRef CP_CFObject< CFDataRef >::fCFObject [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:22:26 2005 for CPLAT_MacOS by  doxygen 1.4.0