class XGHandle

Declared in <XHandle.h>

This is the wrapper to a block of movable memory.


Construction/Destruction

XGHandle::XGHandle
XGHandle::~XGHandle

Memory size

XGHandle::GetSize
XGHandle::SetSize

Memory extraction

XGHandle::GetChar
XGHandle::GetLong
XGHandle::GetMemory
XGHandle::GetShort
XGHandle::SetChar
XGHandle::SetLong
XGHandle::SetMemory
XGHandle::SetShort

Memory Access

XGHandle::Lock
XGHandle::Unlock
XGHandle::operator *

Memory manipulation

XGHandle::Append
XGHandle::Delete
XGHandle::Insert


Construction/Destruction

XGHandle::XGHandle

Usage: void XGGroupBox::DoDrawView(Rect)

Create me. The 'pagesize' value is the number of bytes which I try to allocate at a time to satisfy handle resize requests.

XGHandle::~XGHandle

Usage: XGHandle::~XGHandle()

Delete me

Memory size

XGHandle::GetSize

Usage: unsigned long GetSize()const

Returns the size of this handle.

XGHandle::SetSize

Usage: void XGHandle::SetSize(unsigned long size)

Set the new size of this handle. This will work unless it's time to reallocate the data--in that case, this may fail

Memory extraction

XGHandle::GetChar

Usage: char GetChar(unsigned long off)const

Gets the character at the specified byte offset.

XGHandle::GetLong

Usage: long XGHandle::GetLong(unsigned long off)const

Get the long integer in a portable way. This converts the word object from network byte order to the native order of this platform.

XGHandle::GetMemory

Usage: void XGHandle::GetMemory(unsigned long off,unsigned long len,void*data)const

Copy memory from handle into array

XGHandle::GetShort

Usage: short XGHandle::GetShort(unsigned long off)const

Get the short integer in a portable way. This converts the word object from network byte order to the native order of this platform.

XGHandle::SetChar

Usage: void SetChar(unsigned long off,char c)

Sets the character at the specified byte offset to the byte provided

XGHandle::SetLong

Usage: void XGHandle::SetLong(unsigned long off,long value)

Set the long integer in a portable way This stores the word object from native order of this platform to network order.

XGHandle::SetMemory

Usage: void XGHandle::SetMemory(unsigned long off,unsigned long len,const void*data)

Copy memory from array into handle

XGHandle::SetShort

Usage: void XGHandle::SetShort(unsigned long off,short value)

Set the short integer in a portable way. This stores the word object from native order of this platform to network order.

Memory Access

XGHandle::Lock

Usage: void XGHandle::Lock()

This locks the handle. You should use the XGHandleLock object to lock this handle in an exception-safe manner.

XGHandle::Unlock

Usage: void XGHandle::Unlock()

Unlock memory. You should use the XGHandleLock object to unlock this handle in an exception/safe manner.

XGHandle::operator *

Usage: void*XGHandle::operator*()const

This is the quick and dirty way to access memory without locking the handle. Best to lock the handle instead

Memory manipulation

XGHandle::Append

Usage: void XGHandle::Append(unsigned long len,void*ptr)

Append a block of memory to the end of this thing

XGHandle::Delete

Usage: void XGHandle::Delete(unsigned long off,unsigned long len)

Delete a chunk of memory from the spot specified

XGHandle::Insert

Usage: void XGHandle::Insert(unsigned long off,unsigned long len,void*ptr)

Insert memory into the spot specified