PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBRealloc
Wrapper Class for the IRealloc interface.
#include <SFBRealloc.h.hpp>
class SFBRealloc : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBRealloc)

Inheritance diagram

 Inheritance diagram of SFBReallocClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X X O O

Reference

BREW API IRealloc

Member

Public Functions
Void ERRMALLOCREC( VoidPtrPtr block )
Allocate a typed block of memory
Void ERRMALLOCRECEX( UInt32 u , VoidPtrPtr block )
Allocate a typed block of memory plus some extra space.
SFCError ErrMalloc( SInt32 size , VoidPtrPtr block )
Allocates a block of memory. The memory is zero-initialized.
SFCError ErrMallocName( SInt32 size , VoidPtrPtr block , ACharConstPtr name )
Allocates a block of memory, and tags it with a name.
SFCError ErrMallocName( SInt32 size , VoidPtrPtr block , SFXAnsiStringConstRef name )
Allocates a block of memory, and tags it with a name.
SFCError ErrMallocNameNoZI( SInt32 size , VoidPtrPtr block , ACharConstPtr name )
This function is the same as SFBRealloc::ErrMallocName(), except that the new memory is not zero-initializated.
SFCError ErrMallocNameNoZI( SInt32 size , VoidPtrPtr block , SFXAnsiStringConstRef name )
This function is the same as SFBRealloc::ErrMallocName(), except that the new memory is not zero-initializated.
SFCError ErrMallocNoZI( SInt32 size , VoidPtrPtr block )
This function is exactly the same as SFBRealloc::ErrMalloc(), except that the new memory is not zero-initializated.
SFCError ErrRealloc( SInt32 size , VoidPtrPtr block )
Reallocs a block of memory. Any newly allocated memory is zero-initialized.
SFCError ErrReallocName( SInt32 size , VoidPtrPtr block , ACharConstPtr name )
Reallocates a block of memory to a new size, assigning it a name. Any newly allocated memory is zero-initialized.
SFCError ErrReallocName( SInt32 size , VoidPtrPtr block , SFXAnsiStringConstRef name )
Reallocates a block of memory to a new size, assigning it a name. Any newly allocated memory is zero-initialized.
SFCError ErrReallocNameNoZI( SInt32 size , VoidPtrPtr block , ACharConstPtr name )
This function is the same as SFBRealloc::ErrReallocName(), except that the new memory is not zero-initializated.
SFCError ErrReallocNameNoZI( SInt32 size , VoidPtrPtr block , SFXAnsiStringConstRef name )
This function is the same as SFBRealloc::ErrReallocName(), except that the new memory is not zero-initializated.
SFCError ErrReallocNoZI( SInt32 size , VoidPtrPtr block )
This function is the same as SFBRealloc::ErrRealloc(), except that the new memory is not zero-initializated.
Void FREE_IF( VoidPtr block )
Free a pointer and set to NULL
SFCError Free( VoidPtr block )
Frees a block of memory, given its pointer. If passed NULL, it does nothing.
static
SFBReallocSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBRealloc instance.
static
SFBReallocSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBRealloc instance.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBRealloc::ERRMALLOCREC
Allocate a typed block of memory
[ public ]
Void ERRMALLOCREC(
    VoidPtrPtr block   // where to store newly allocated memory
);

Return value

integer error value, AEE_SUCCESS if all goes well, otherwise a failure-specific error value

Reference

BREW API IREALLOC_ERRMALLOCREC


SFBRealloc::ERRMALLOCRECEX
Allocate a typed block of memory plus some extra space.
[ public ]
Void ERRMALLOCRECEX(
    UInt32 u           // integer number of extra bytes to allocate 
    VoidPtrPtr block   // where to store newly allocated memory 
);

Return value

integer error value, AEE_SUCCESS if all goes well, otherwise a failure-specific error value

Reference

BREW API IREALLOC_ERRMALLOCRECEX


SFBRealloc::ErrMalloc
Allocates a block of memory. The memory is zero-initialized.
[ public ]
SFCError ErrMalloc(
    SInt32 size        // size of the block to allocate 
    VoidPtrPtr block   // pointer to pointer to fill with new block 
);

Return value

AEE_SUCCESS if all goes well, otherwise, a failure-specific error value

Reference

BREW API IRealloc_ErrMalloc | SFBRealloc::ErrMallocNoZI


SFBRealloc::ErrMallocName
Allocates a block of memory, and tags it with a name.
[ public ]
SFCError ErrMallocName(
    SInt32 size          // size of the block to allocate 
    VoidPtrPtr block     // pointer to pointer to fill with new block 
    ACharConstPtr name   // a null-terminated string to associate with the new node; may be NULL 
);
[ public ]
SFCError ErrMallocName(
    SInt32 size                  // size of the block to allocate 
    VoidPtrPtr block             // pointer to pointer to fill with new block 
    SFXAnsiStringConstRef name   // a null-terminated string to associate with the new node; may be NULL 
);

Return value

AEE_SUCCESS if all goes well, otherwise, a failure-specific error value

Reference

BREW API IRealloc_ErrMallocName | SFBRealloc::ErrMallocNameNoZI


SFBRealloc::ErrMallocNameNoZI
This function is the same as SFBRealloc::ErrMallocName(), except that the new memory is not zero-initializated.
[ public ]
SFCError ErrMallocNameNoZI(
    SInt32 size          // size of the block to allocate 
    VoidPtrPtr block     // pointer to pointer to fill with new block 
    ACharConstPtr name   // a null-terminated string to associate with the new node. may be NULL
);
[ public ]
SFCError ErrMallocNameNoZI(
    SInt32 size                  // size of the block to allocate 
    VoidPtrPtr block             // pointer to pointer to fill with new block 
    SFXAnsiStringConstRef name   // a null-terminated string to associate with the new node. may be NULL
);

Return value

AEE_SUCCESS if all goes well, otherwise, a failure-specific error value

Reference

BREW API IRealloc_ErrMallocNameNoZI| SFBRealloc::ErrMallocName


SFBRealloc::ErrMallocNoZI
This function is exactly the same as SFBRealloc::ErrMalloc(), except that the new memory is not zero-initializated.
[ public ]
SFCError ErrMallocNoZI(
    SInt32 size        // size of the block to allocate 
    VoidPtrPtr block   // pointer to pointer to fill with new block 
);

Return value

AEE_SUCCESS if all goes well, otherwise, a failure-specific error value

Reference

BREW API IRealloc_ErrMallocNoZI | SFBRealloc::ErrMalloc


SFBRealloc::ErrRealloc
Reallocs a block of memory. Any newly allocated memory is zero-initialized.
[ public ]
SFCError ErrRealloc(
    SInt32 size        // new size of the block 
    VoidPtrPtr block   // on input, the pointer to block of memory to resize, on output: the resulting resized block of memory. this may be a new pointer if the block cannot be resized in place
);

Return value

AEE_SUCCESS if all goes well, otherwise, a failure-specific error value

Reference

BREW API IRealloc_ErrRealloc | SFBRealloc::ErrReallocNoZI


SFBRealloc::ErrReallocName
Reallocates a block of memory to a new size, assigning it a name. Any newly allocated memory is zero-initialized.
[ public ]
SFCError ErrReallocName(
    SInt32 size          // new size of the block 
    VoidPtrPtr block     // on input, the pointer to block of memory to resize, on output: the resulting resized block of memory. this may be a new pointer if the block cannot be resized in place 
    ACharConstPtr name   // a null-terminated string to associate with the new node; may be NULL 
);
[ public ]
SFCError ErrReallocName(
    SInt32 size                  // new size of the block 
    VoidPtrPtr block             // on input, the pointer to block of memory to resize, on output: the resulting resized block of memory. this may be a new pointer if the block cannot be resized in place 
    SFXAnsiStringConstRef name   // a null-terminated string to associate with the new node; may be NULL 
);

Return value

AEE_SUCCESS if all goes well, otherwise, a failure-specific error value

Reference

BREW API IRealloc_ErrReallocName | SFBRealloc::ErrReallocNameNoZI


SFBRealloc::ErrReallocNameNoZI
This function is the same as SFBRealloc::ErrReallocName(), except that the new memory is not zero-initializated.
[ public ]
SFCError ErrReallocNameNoZI(
    SInt32 size          // new size of the block 
    VoidPtrPtr block     // on input, the pointer to block of memory to resize, on output: the resulting resized block of memory. this may be a new pointer if the block cannot be resized in place 
    ACharConstPtr name   // a null-terminated string to associate with the new node. may be NULL 
);
[ public ]
SFCError ErrReallocNameNoZI(
    SInt32 size                  // new size of the block 
    VoidPtrPtr block             // on input, the pointer to block of memory to resize, on output: the resulting resized block of memory. this may be a new pointer if the block cannot be resized in place 
    SFXAnsiStringConstRef name   // a null-terminated string to associate with the new node. may be NULL 
);

Return value

AEE_SUCCESS if all goes well, otherwise, a failure-specific error value

Reference

BREW API IRealloc_ErrReallocNameNoZI | SFBRealloc::ErrReallocName


SFBRealloc::ErrReallocNoZI
This function is the same as SFBRealloc::ErrRealloc(), except that the new memory is not zero-initializated.
[ public ]
SFCError ErrReallocNoZI(
    SInt32 size        // new size of the block 
    VoidPtrPtr block   // on input, the pointer to block of memory to resize, on output: the resulting resized block of memory. this may be a new pointer if the block cannot be resized in place
);

Return value

AEE_SUCCESS if all goes well, otherwise, a failure-specific error value

Reference

BREW API IRealloc_ErrReallocNoZI | SFBRealloc::ErrRealloc


SFBRealloc::FREE_IF
Free a pointer and set to NULL
[ public ]
Void FREE_IF(
    VoidPtr block   // pointer to free and clear 
);

Description

block will bet set to NULL

Reference

BREW API IREALLOC_FREEIF


SFBRealloc::Free
Frees a block of memory, given its pointer. If passed NULL, it does nothing.
[ public ]
SFCError Free(
    VoidPtr block   // the pointer to block of memory to free 
);

Return value

AEE_SUCCESS if all goes well (pointer freed or is NULL), otherwise, a failure-specific error value

Reference

BREW API IRealloc_Free


SFBRealloc::NewInstance
Create a new SFBRealloc instance.
[ public, static ]
SFBReallocSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBReallocSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);