Header Header

gxPtr Class Reference

List of all members.


Detailed Description

Class for global memory operations (Obsolete).


Public Member Functions

 gxPtr ()
 Initializes the class.
 gxPtr (int size)
 Initializes the class and allocates memory with specified size in bytes.
 ~gxPtr ()
 Desctructs the class.
bool Realloc (int size) throw (gxError)
 Reallocates or frees a previously allocated memory area or allocates a new area.
bool Alloc (int size) throw (gxError)
 Reallocates a previously allocated memory area or allocates a new area.
bool Free (void) throw (gxError)
 Frees a previously allocated memory area.
int Size (void) const throw (gxError)
 Gets the size of a previously allocated memory area in bytes.
void * Ptr (void) const
 Gets the pointer of the memory area.
 operator void * () const
 Gets the pointer of the memory area.
 operator const void * () const
 Gets the pointer of the memory area.


Constructor & Destructor Documentation

gxPtr ( int  size  )  [inline]

Initializes the class and allocates memory with specified size in bytes.

Parameters:
size Size of memory area.

References Alloc().

~gxPtr (  )  [inline]

Desctructs the class.


Member Function Documentation

bool Realloc ( int  size  )  throw (gxError) [inline]

Reallocates or frees a previously allocated memory area or allocates a new area.

Parameters:
size Size of the new memory area in bytes. If it is zero it frees the area.
Returns:
On success: non-zero ( see gx_geterror() )

References gx_call().

Referenced by Alloc(), and Free().

bool Alloc ( int  size  )  throw (gxError) [inline]

Reallocates a previously allocated memory area or allocates a new area.

Parameters:
size Size of the new memory area in bytes.
Returns:
On success: non-zero ( see gx_geterror() )

References Realloc().

Referenced by gxPtr().

bool Free ( void   )  throw (gxError) [inline]

Frees a previously allocated memory area.

Returns:
On success: non-zero ( see gx_geterror() )

References Realloc().

int Size ( void   )  const throw (gxError) [inline]

Gets the size of a previously allocated memory area in bytes.

Returns:
The size of a previously allocated memory area in bytes.

References gx_call().

void* Ptr ( void   )  const [inline]

Gets the pointer of the memory area.

Returns:
Pointer of the memory area.

operator void * (  )  const [inline]

Gets the pointer of the memory area.

Returns:
Pointer of the memory area.

operator const void * (  )  const [inline]

Gets the pointer of the memory area.

Returns:
Pointer of the memory area.


Generated  for GX
(c) ARH Inc.