SADB-Client  0.99
Situational Awareness Database
 All Classes Functions Variables
Public Member Functions | Public Attributes | List of all members
SADB::SADBStringTable Class Reference

#include <SADB.h>

Public Member Functions

 SADBStringTable (void)
 
 ~SADBStringTable (void)
 
void Initialize (void)
 Initialize Model.
 
void Free (void)
 Free all allocated memory.
 
void SetName (const char *name)
 
void GetByName (const char *name)
 
void SetDescription (const char *desc)
 
void SetBlackboard (Blackboard *board)
 
void SetDimensions (int X, int Y)
 
void SetString (int X, int Y, const char *Str)
 
const char * GetString (int X, int Y)
 
char * GetNewString (int X, int Y)
 
void LoadCSV (const char *Filename)
 Load a csv file containing strings.
 
void GetLatestValues (void)
 Get the latest version of the table from the board.
 
void GetLatestValue (int X, int Y)
 

Public Attributes

SADBu8 * Name
 Human Readable Object Name.
 
BlackboardObject Object
 Object to store the list of indices.
 
int nCols
 Number of Columns.
 
int nRows
 Number of Rows.
 
Blackboard * Board
 Blackboard.
 

Detailed Description

Class used to store tables of strings in SADB

Note
If you change the dimensions of the table to a smaller size (shrink), some object will remain on the blackboard without being linked to a string table. If the table size is incremented at a later time, the objects will be linked again. This is to preserve history.

Constructor & Destructor Documentation

SADBStringTable::SADBStringTable ( void  )

Constructor, initializes object

See also
SADBStringTable::Initialize
SADBStringTable::~SADBStringTable ( void  )

Destructor, deinitializes object

See also
SADBStringTable::Free

Member Function Documentation

void SADBStringTable::GetByName ( const char *  name)

Get a stringtable object from the SADB server

Note
Just a wrapper for SetName, to be consistent with the GetByName function of standard blackboard objects.
Parameters
nameDesired name
void SADBStringTable::GetLatestValue ( int  X,
int  Y 
)

Get the latest value of a cell

Parameters
XColumn index
YRow index
char * SADBStringTable::GetNewString ( int  X,
int  Y 
)

Get a string in the table

Parameters
XColumn position
YRow Position
Returns
Pointer to the string (don't forget to free it) String to be set
const char * SADBStringTable::GetString ( int  X,
int  Y 
)

Get a string in the table

Parameters
XColumn position
YRow Position
Returns
Pointer to the string (don't forget to free it) String to be set
void SADBStringTable::SetBlackboard ( Blackboard *  board)

Attach the string table to a blackboard

Parameters
boardBlackboard to be used
void SADBStringTable::SetDescription ( const char *  desc)

Passtrough function that sets the description of the underlying object

Parameters
descDescription
void SADBStringTable::SetDimensions ( int  X,
int  Y 
)

Set the size fo the string table (always 2D)

Note
Must set blackboard before allocating memory
Parameters
XNumber of columns
YNumber of Rows
void SADBStringTable::SetName ( const char *  name)

Passtrough function that sets the name of the underlying object

Parameters
nameName of the object
void SADBStringTable::SetString ( int  X,
int  Y,
const char *  Str 
)

Set a string in the table

Parameters
XColumn position
YRow Position
StrString to be set

The documentation for this class was generated from the following files: