CRM64Pro GDK v0.11.0
A free cross-platform game development kit built on top of SDL 3.0
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions

Detailed Description

v1.20 (30 April 2023)
The Archive module includes the Archive Manager and Archive Objects for managing the CDC files.

CDC format is an extensible and open data container definition based on data blocks. It was designed to be used with CRM64Pro GDK and is the successor of the old DPF format developed  for CRM32Pro SDK.

The CDC only defines a minimum magic header(8 bytes) which contains the CDC implementation version and a set of methods that create the interface. These methods are shown on below table.

For the time being, there is only one implementation of the CDC format, it is called CDCv1.1 with the following features:

CDC interface definition CDC v1.1 implementation details
load() At CDC loading time, it checks for IO data corruption.
save() Automatically called after a new data block is successfully added.
blockAdd() Add a new data block:
  • if an identical (same type, name and payload) data block exists, does nothing
  • or... if the block already exists (same type and name), before performing a "soft" deletion, it tries to overwrite the payload if fits
  • of... if it is a new block, just add it
blockAddFile() Add a file into a block. Follows the same rules as blockAdd(). The block name is the [directory]+filename+[extension] added and the block type is "C64_FILE".
blockLoad() Load the data block. Note that "soft" deleted data blocks are not loaded.
blockSearch() data block search is extremely fast due to the fixed index of the CDC.
blockAt() Accessing to a random data blocks is extremely fast due to the fixed index of the CDC.
blockDelete() Perform a "soft" deletion of the data block. It can not be loaded but physically is present.
blockUndelete() Recover a "soft" deleted data block.
getNumberOfBlocks() Get the number of data blocks.
getFragmentation() Due to the "soft" deletion of data blocks and block overwritten feature, the CDC can be fragmented.
defrag() Perform a physical deletion of the "soft" deleted data blocks and keep the file free of fragmentation.It also resizes the size of maximum data blocks.
secure() Encrypt the index using AES-256 algorithm to disallow the access to the data blocks. Key size must be from 4 up to 32 bytes.
unSecure() Decrypt the index using the valid password. It is very important to remember the password or there is no way to recover all data blocks.


The Archive Manager encapsulates the CDC definition, CDCv1.1 implementation and some useful features for managing these files.

This is a sharing manager: it has the ability of sharing a CDC id to a group of owners when they request to open an already opened file based on the file path [directory]+file+[extension] as the key. When the last one of them closes the CDC id, it will be effectively closed.

Only a single instance of the Archive Manager exists which is created once Main is instantiated.
You can get a reference to this manager using Main::IArchiveMgr() method.

Note
The Archive Manager is automatically released when Main::Terminate() is called.
At this time, any resource still loaded, will be released avoding resource leaks.

Classes

class  CRM64Pro::Archive
 Archive Object class. More...
 
class  CRM64Pro::ArchiveMgr
 Archive Manager class. More...
 

Macros

#define CDCv1_sPARAM1   64
 
#define CDCv1_sPARAM2   16
 

Enumerations

enum  CRM64Pro::eArchiveBlockStore { CRM64Pro::ABS_RAW = 1 , CRM64Pro::ABS_COMPRESSED = 2 , CRM64Pro::ABS_CRYPTED = 3 }
 Archive block storing method. More...
 

Functions

Sint32 CRM64Pro::Archive::info (Sint32 iMode=0)
 Request CDC object information.
 
Sint32 CRM64Pro::Archive::getName (string &sName)
 Get the name.
 
Uint32 CRM64Pro::Archive::getID ()
 Get the ID.
 
Sint32 CRM64Pro::Archive::blockAdd (Block &myBlock)
 Add a data block.
 
Sint32 CRM64Pro::Archive::blockAddFile (const string &sFile, eArchiveBlockStore eABS=ABS_COMPRESSED)
 Add a file.
 
Sint32 CRM64Pro::Archive::blockDelete (Block &myBlock)
 Delete a data block.
 
Sint32 CRM64Pro::Archive::blockUndelete (Uint32 iBlock, Block &myBlock)
 Recover a deleted data block.
 
Sint32 CRM64Pro::Archive::blockSearch (Block &myBlock)
 Search for a given data block.
 
Sint32 CRM64Pro::Archive::blockAt (Uint32 iBlock, Block &myBlock)
 Access to the given data block position.
 
Sint32 CRM64Pro::Archive::blockLoad (Block &myBlock)
 Load a data block.
 
Sint32 CRM64Pro::Archive::blockLoadReleaseData (Block &myBlock)
 Free a loaded data block.
 
Uint32 CRM64Pro::Archive::getUsedBlocks ()
 Get the number of used data blocks.
 
Uint32 CRM64Pro::Archive::getMaxBlocks ()
 Get the number of maximum data blocks.
 
float CRM64Pro::Archive::getFragmentation ()
 Get the fragmentation.
 
Sint32 CRM64Pro::Archive::secure (const unsigned char *myKey, Uint32 iKeySize)
 Secure the CDC.
 
Sint32 CRM64Pro::Archive::unSecure ()
 Unsecure a CDC file.
 
Sint32 CRM64Pro::ArchiveMgr::info (Sint32 iMode=0)
 Request Archive Manager information.
 
Sint32 CRM64Pro::ArchiveMgr::create (const string &sFile, Uint32 iNumBlocks=0)
 Create a new CDC file.
 
Sint32 CRM64Pro::ArchiveMgr::close (Sint32 idCDC)
 Close and destroy a CDC.
 
Sint32 CRM64Pro::ArchiveMgr::getNum ()
 Get number of loaded objects.
 
Sint32 CRM64Pro::ArchiveMgr::setName (Sint32, const string &)
 This method is not implemented.
 
ArchiveCRM64Pro::ArchiveMgr::get (Sint32 idCDC=0)
 Get a pointer to the CDC using its handler.
 
Sint32 CRM64Pro::ArchiveMgr::defrag (const string &sFile, Uint32 iNumBlocks=0)
 Defragment a CDC file.
 
Sint32 CRM64Pro::ArchiveMgr::load (const string &sFile, const unsigned char *myKey=nullptr, Uint32 iKeySize=0)
 Load a CDC file.
 
Sint32 CRM64Pro::CursorMgr::info (Sint32 iMode=0)
 Request Cursor Manager information.
 
Sint32 CRM64Pro::CursorMgr::create (const string &sName, Uint32 iVersion=10)
 Create a new cursor.
 
Sint32 CRM64Pro::CursorMgr::close (Sint32 idCur)
 Close and destroy a cursor.
 
Sint32 CRM64Pro::CursorMgr::getNum ()
 Get number of loaded objects.
 
Sint32 CRM64Pro::CursorMgr::setName (Sint32 idCur, const string &sName)
 Change the object name.
 
CursorCRM64Pro::CursorMgr::get (Sint32 idCur)
 Get a pointer to the cursor using its handler.
 
Sint32 CRM64Pro::CursorMgr::select (Sint32 idCur)
 Select a mouse cursor.
 
Sint32 CRM64Pro::CursorMgr::getSelect ()
 Get selected mouse cursor.
 
Sint32 CRM64Pro::CursorMgr::show ()
 Make visible the selected mouse cursor.
 
Sint32 CRM64Pro::CursorMgr::hide ()
 Hide the mouse cursor.
 
Sint32 CRM64Pro::CursorMgr::setPosition (Sint32 iX, Sint32 iY, Sint32 idScreen=0)
 Set the mouse cursor position.
 
Sint32 CRM64Pro::CursorMgr::getPosition (Sint32 *iX, Sint32 *iY)
 Get the mouse cursor position.
 
Sint32 CRM64Pro::CursorMgr::getButtons ()
 Get the mouse buttons.
 
Sint32 CRM64Pro::CursorMgr::getButtonsPrev ()
 Get the previous mouse buttons.
 
Sint32 CRM64Pro::CursorMgr::getFocus ()
 Get the Screen id which currently has mouse focus.
 
Sint32 CRM64Pro::CursorMgr::child (Sint32 idCur)
 Create a child cursor dependant on the provided one(the parent).
 
Sint32 CRM64Pro::CursorMgr::load (const string &sFileCDC, const string &sName)
 Load a cursor stored in a CDC file.
 
Sint32 CRM64Pro::CursorMgr::load (const Sint32 idCDC, const string &sName)
 Load a cursor stored in a CDC file.
 
Sint32 CRM64Pro::CursorMgr::remove (Sint32 idCDC, const string &sName)
 Remove a cursor stored in a CDC file.
 

Macro Definition Documentation

◆ CDCv1_sPARAM1

#define CDCv1_sPARAM1   64

CDC v1.x: size of custom char array attribute 1

◆ CDCv1_sPARAM2

#define CDCv1_sPARAM2   16

CDC v1.x: size of custom char array attribute 2

Enumeration Type Documentation

◆ eArchiveBlockStore

Archive block storing method.

Enumerator
ABS_RAW 

Block is stored in raw mode.

ABS_COMPRESSED 

Block is compressed and stored.

ABS_CRYPTED 

Block is crypted and stored.

Function Documentation

◆ info() [1/3]

Sint32 CRM64Pro::Archive::info ( Sint32  iMode = 0)

Request CDC object information.

For displaying the information, it uses the default log.

Parameters
iModeunused for the time being.
Returns
0 on success or a negative error code on failure.

◆ getName()

Sint32 CRM64Pro::Archive::getName ( string &  sName)

Get the name.

Parameters
sNamea string containing the [directory] and the file name plus the .cdc extension.
Returns
0 on success or a negative error code on failure.

◆ getID()

Uint32 CRM64Pro::Archive::getID ( )

Get the ID.

Returns
the object ID.

◆ blockAdd()

Sint32 CRM64Pro::Archive::blockAdd ( Block myBlock)

Add a data block.

Parameters
myBlockfilled Block struct, at least it needs pData and iSize.
Custom attributes depend on the CDC version.
Returns
0 on success or a negative error code on failure.
Note
The exact behaviour of this method depends on the CDC version.
Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ blockAddFile()

Sint32 CRM64Pro::Archive::blockAddFile ( const string &  sFile,
eArchiveBlockStore  eABS = ABS_COMPRESSED 
)

Add a file.

Parameters
sFilestring containing the [directory]+filename+[extension] to be added.
Directory separators '\' and '/' are supported.
eABSCheck eArchiveBlockStore enum for further information.
By default is set to ABS_COMPRESSED.
Returns
0 on success or a negative error code on failure.
Note
The exact behaviour of this method depends on the CDC version.
Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ blockDelete()

Sint32 CRM64Pro::Archive::blockDelete ( Block myBlock)

Delete a data block.

Parameters
myBlockfilled Block struct with custom attributes depending on the CDC version.
Returns
0 on success or a negative error code on failure.
Note
The exact behaviour of this method depends on the CDC version.
Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ blockUndelete()

Sint32 CRM64Pro::Archive::blockUndelete ( Uint32  iBlock,
Block myBlock 
)

Recover a deleted data block.

Parameters
iBlockblock index position from [0 to used_blocks - 1] which contains a deleted data block.
Use getUsedBlocks() for getting the used_blocks.
myBlockfilled Block struct with custom attributes depending on the CDC version.
pData must be nullptr.
In case the block is recovered, myBlock struct will contain all its attributes but pData.
Returns
0 on success or a negative error code on failure.
Note
The exact behaviour of this method depends on the CDC version.
Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ blockSearch()

Sint32 CRM64Pro::Archive::blockSearch ( Block myBlock)

Search for a given data block.

Parameters
myBlockfilled Block struct with custom attributes depending on the CDC version.
In case the block is found, myBlock struct will contain all its attributes but pData.
Returns
[0 to used_blocks - 1] on success indicating the block index position or a negative error code on failure.
Use getUsedBlocks() for getting the used_blocks.
Note
The exact behaviour of this method depends on the CDC version.
Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ blockAt()

Sint32 CRM64Pro::Archive::blockAt ( Uint32  iBlock,
Block myBlock 
)

Access to the given data block position.

Parameters
iBlockblock index position from [0 to used_blocks - 1].
Use getUsedBlocks() for getting the used_blocks.
myBlockIn case the block index position is found, myBlock struct will contain all its attributes but pData.
Returns
0 on success or a negative error code on failure.
Note
The exact behaviour of this method depends on the CDC version.
Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ blockLoad()

Sint32 CRM64Pro::Archive::blockLoad ( Block myBlock)

Load a data block.

Parameters
myBlockfilled Block struct with custom attributes depending on the CDC version.
pData must be nullptr.
In case the block is found, myBlock struct will contain all its attributes plus the pData loaded.
Returns
0 on success or a negative error code on failure.
Note
The exact behaviour of this method depends on the CDC version.
Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ blockLoadReleaseData()

Sint32 CRM64Pro::Archive::blockLoadReleaseData ( Block myBlock)

Free a loaded data block.

Parameters
myBlockBlock struct with pData loaded by blockLoad() method.
Returns
always return 0.

◆ getUsedBlocks()

Uint32 CRM64Pro::Archive::getUsedBlocks ( )

Get the number of used data blocks.

Returns
[0 to max_blocks] the number of used blocks(used_blocks).

◆ getMaxBlocks()

Uint32 CRM64Pro::Archive::getMaxBlocks ( )

Get the number of maximum data blocks.

Returns
a positive value with the maximum number(max_blocks) of blocks.

◆ getFragmentation()

float CRM64Pro::Archive::getFragmentation ( )

Get the fragmentation.

Returns
float value in [0-100] range expressed in percentage (the lower, the better as less fragmentation is present) or a negative error code on failure.
Note
Depending on the CDC version, the storing method can produce fragmentation when some blocks are deleted or not.
The exact behaviour of this method depends on the CDC version.
Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ secure()

Sint32 CRM64Pro::Archive::secure ( const unsigned char *  myKey,
Uint32  iKeySize 
)

Secure the CDC.

Parameters
myKeyunsigned char array of iKeySize containing the key.
iKeySizethe key size on bytes. They key size range in bytes for a CDC v1.1 must be from 4 up to 32.
Returns
0 on success or a negative error code on failure.
Warning
Securing a CDC file and forgetting the key will cause the incapability to read its content.
Note
The exact behaviour of this method depends on the CDC version.
Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ unSecure()

Sint32 CRM64Pro::Archive::unSecure ( )

Unsecure a CDC file.

Returns
0 on success or a negative error code on failure.
Note
The exact behaviour of this method depends on the CDC version. Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ info() [2/3]

Sint32 CRM64Pro::ArchiveMgr::info ( Sint32  iMode = 0)

Request Archive Manager information.

For displaying the information, it uses the default log.

Parameters
iMode-1 for displaying only Manager information.
0 for displaying Manager and all Objects information. This is the default value.
idCDC for displaying Manager and given CDC id information.
Returns
0 on success or a negative error code on failure.

◆ create() [1/2]

Sint32 CRM64Pro::ArchiveMgr::create ( const string &  sFile,
Uint32  iNumBlocks = 0 
)

Create a new CDC file.

Parameters
sFilestring containing the [directory]+filename+[extension].
If it does not contain the extension .cdc, it is automatically added.
Directory separators '\' and '/' are supported.
iNumBlocksMaximum number of data blocks. The minimum is 256.
Returns
greater than 0 on success(the CDC id) or a negative error code on failure.
Note
If the provided file name already exists, it does nothing and return an error code.
Different CDC versions could be available but at creation time, we always use the newer one available although older ones can still be loaded.

◆ close() [1/2]

Sint32 CRM64Pro::ArchiveMgr::close ( Sint32  idCDC)

Close and destroy a CDC.

Parameters
idCDC0 for closing all CDC files or the CDC id.
As the Archive Manager has the ability of sharing a CDC id, if the CDC file is shared, it will not be removed till the last owner call this method.
Returns
0 on success or a negative error code on failure.
Note
If you forget to close a CDC file, it will be automatically closed once the GDK is terminated.

◆ getNum() [1/2]

Sint32 CRM64Pro::ArchiveMgr::getNum ( )

Get number of loaded objects.

Returns
the number of CDC files.

◆ setName() [1/2]

Sint32 CRM64Pro::ArchiveMgr::setName ( Sint32  idCDC,
const string &  sName 
)

This method is not implemented.

Parameters
idCDCUnused
sNameUnused
Returns
Does not return any value.

◆ get() [1/2]

Archive * CRM64Pro::ArchiveMgr::get ( Sint32  idCDC = 0)

Get a pointer to the CDC using its handler.

By default it returns the first CDC loaded.

Parameters
idCDCCDC id.
Returns
nullptr the CDC was not found.
A pointer to the CDC object.

◆ defrag()

Sint32 CRM64Pro::ArchiveMgr::defrag ( const string &  sFile,
Uint32  iNumBlocks = 0 
)

Defragment a CDC file.

Parameters
sFilestring containing the [directory]+filename+[extension].
Directory separators '\' and '/' are supported.
iNumBlocksMaximum number of data blocks. The minimum is 64 and by default, is set to 0 for keeping current max block number.
It is used for resizing the maximum number of data blocks.
Returns
0 on success or a negative error code on failure.
Note
Depending on the CDC version, the storing method can produce fragmentation when some blocks are deleted.
For defragmenting a CDC file, it must be closed and unsecured.
The exact behaviour of this method depends on the CDC version.
Please check the CDC implementation description on ArchiveMgr Detailed Description.

◆ load() [1/3]

Sint32 CRM64Pro::ArchiveMgr::load ( const string &  sFile,
const unsigned char *  myKey = nullptr,
Uint32  iKeySize = 0 
)

Load a CDC file.

The Archive Manager has the ability of sharing ids based on the file path [directory]+file+[extension] as the key, so before trying to load a new one, it checks if it is already loaded for sharing it.

Parameters
sFilestring containing the [directory]+filename+[extension].
Directory separators '\' and '/' are supported.
myKeyunsigned char array of iKeySize containing the key.
It is only used when the CDC to be loaded is secured. Default value set to nullptr.
iKeySizefrom 4 to 32. 0 for loading a CDC without key (default value).
Returns
greater than 0 on success(the CDC id) or a negative error code on failure.

◆ info() [3/3]

Sint32 CRM64Pro::CursorMgr::info ( Sint32  iMode = 0)

Request Cursor Manager information.

For displaying the information, it uses the default log.

Parameters
iMode-1 for displaying only Manager information.
0 for displaying Manager and all Objects information. This is the default value.
idCursor for displaying Manager and given Cursor id information.
Returns
0 on success or a negative error code on failure.

◆ create() [2/2]

Sint32 CRM64Pro::CursorMgr::create ( const string &  sName,
Uint32  iVersion = 10 
)

Create a new cursor.

This method will create an empty cursor (no image assigned), use Cursor::assignImage() method for assigning the image.

Parameters
sNameThe name to give to the cursor e.g. 'myCursor'.
The object name must be unique and with a maximum size of 64 characters or will be truncated.
iVersionCursor version. 10 means 1.0 which is the only version supported (as of now).
v1.0 is set by default.
Returns
greater than 0 on success(the Cursor id) or a negative error code on failure.
Note
If the provided name already exists, it does nothing and return an error code.

◆ close() [2/2]

Sint32 CRM64Pro::CursorMgr::close ( Sint32  idCur)

Close and destroy a cursor.

Parameters
idCur0 for closing all cursors or the Cursor id.
Stand-alone and child cursors can be closed but parent ones, can not as they have at least one dependency(a child).
Returns
0 on success or a negative error code on failure.
Note
If you forget to close a Cursor, it will be automatically closed once the GDK is terminated.

◆ getNum() [2/2]

Sint32 CRM64Pro::CursorMgr::getNum ( )

Get number of loaded objects.

Returns
the number of cursors.

◆ setName() [2/2]

Sint32 CRM64Pro::CursorMgr::setName ( Sint32  idCur,
const string &  sName 
)

Change the object name.

Parameters
idCurCursor id.
sNameThe name to give to the cursor e.g. 'myCursor'.
The object name must be unique and with a maximum size of 64 characters or will be truncated.
Returns
0 on success or a negative error code on failure.
Note
The image name associated to this cursor will be internally modified: starts with the reserved character '#' + an internal code + the cursor name.

◆ get() [2/2]

Cursor * CRM64Pro::CursorMgr::get ( Sint32  idCur)

Get a pointer to the cursor using its handler.

Parameters
idCurCursor id.
Returns
nullptr the cursor was not found.
A pointer to the cursor object.

◆ select()

Sint32 CRM64Pro::CursorMgr::select ( Sint32  idCur)

Select a mouse cursor.

Parameters
idCurCursor id. It also supports any SDL_SystemCursor.
Returns
0 on success or a negative error code on failure.
Note
Cursors are dinamically build on the first time they are selected. You can use Cursor::build() for building them in advance.

◆ getSelect()

Sint32 CRM64Pro::CursorMgr::getSelect ( )

Get selected mouse cursor.

Returns
Current selected Cursor id.

◆ show()

Sint32 CRM64Pro::CursorMgr::show ( )

Make visible the selected mouse cursor.

Returns
0 on success or a negative error code on failure.

◆ hide()

Sint32 CRM64Pro::CursorMgr::hide ( )

Hide the mouse cursor.

Returns
0 on success or a negative error code on failure.

◆ setPosition()

Sint32 CRM64Pro::CursorMgr::setPosition ( Sint32  iX,
Sint32  iY,
Sint32  idScreen = 0 
)

Set the mouse cursor position.

Parameters
iXinteger with x position.
iYinteger with y position.
idScreenScreen id.
By default it is set to 0 for using the screen with the mouse focus.
Returns
0 on success or a negative error code on failure.

◆ getPosition()

Sint32 CRM64Pro::CursorMgr::getPosition ( Sint32 *  iX,
Sint32 *  iY 
)

Get the mouse cursor position.

Parameters
iXan integer pointer filled in with X mouse position. If nullptr is passed, the method ignores the retrieving of this value.
iYan integer pointer filled in with Y mouse position. If nullptr is passed, the method ignores the retrieving of this value.
Returns
0 on success or a negative error code on failure.
Note
The mouse cursor position is internally updated in Main::update() each Logic Frame update.

◆ getButtons()

Sint32 CRM64Pro::CursorMgr::getButtons ( )

Get the mouse buttons.

Returns
32 bit button bitmask of the current button state.
Note
The mouse buttons are internally updated in Main::update() each Logic Frame update. The button bitmask can be tested using the SDL_BUTTON(X) macros where X is generally 1 for the left, 2 for middle, 3 for the right button.

◆ getButtonsPrev()

Sint32 CRM64Pro::CursorMgr::getButtonsPrev ( )

Get the previous mouse buttons.

Returns
32 bit button bitmask of the previous(the last Logic Frame) button state.
Note
The mouse buttons are internally updated in Main::update() each Logic Frame update. The button bitmask can be tested using the SDL_BUTTON(X) macros where X is generally 1 for the left, 2 for middle, 3 for the right button.

◆ getFocus()

Sint32 CRM64Pro::CursorMgr::getFocus ( )

Get the Screen id which currently has mouse focus.

Returns
0 or greater on success(the Screen id) or a negative error code on failure.
Note
For getting the keyboard focus you can use Main::getKeyboardFocus() method.

◆ child()

Sint32 CRM64Pro::CursorMgr::child ( Sint32  idCur)

Create a child cursor dependant on the provided one(the parent).

A child cursor uses the attributes of the parent and creates also a parent child image for having different attributes, for the time being, only different Hotspots as the colorkey can not be modified on child images and other image attributes are not supported on the SDL cursors system.

Parameters
idCurparent Cursor id.
If the provided cursor is a child, internally it will redirect this request to the parent in order to create the new child.
Returns
greater than 0 on success(the Cursor id) or a negative error code on failure.
Note
The child use the parent's name.

◆ load() [2/3]

Sint32 CRM64Pro::CursorMgr::load ( const string &  sFileCDC,
const string &  sName 
)

Load a cursor stored in a CDC file.

Parameters
sFileCDCstring containing the [directory]+filename.
Directory separators '\' and '/' are supported.
sNamestring with the cursor name (maximum size of 64 characters).
If the Cursor is already created, this method will call child() for creating a child.
Returns
greater than 0 on success(the Cursor id) or a negative error code on failure.

◆ load() [3/3]

Sint32 CRM64Pro::CursorMgr::load ( const Sint32  idCDC,
const string &  sName 
)

Load a cursor stored in a CDC file.

Parameters
idCDCCDC id.
sNamestring with the cursor name (maximum size of 64 characters).
If the Cursor is already created, this method will call child() for creating a child.
Returns
greater than 0 on success(the Cursor id) or a negative error code on failure.

◆ remove()

Sint32 CRM64Pro::CursorMgr::remove ( Sint32  idCDC,
const string &  sName 
)

Remove a cursor stored in a CDC file.

Parameters
idCDCCDC id.
sNamestring with the cursor name (maximum size of 64 characters).
Returns
greater than 0 on success or a negative error code on failure.
Note
The cursor must be closed before trying to remove it from the CDC.