SML::SYMBOL Class Reference
Class for representing variables and functions in SML.
More...
#include <sml/symbol.h>
List of all members.
Public Types |
| enum | SCOPE {
SCOPE_NONE = 0,
SCOPE_TABLE,
SCOPE_BFUNCTION,
SCOPE_KEYWORD,
SCOPE_GLOBAL,
SCOPE_LOCAL,
SCOPE_PERMANENT,
SCOPE_PROTOTYPE,
SCOPE_STATIC
} |
Public Member Functions |
| void | AttachUserData (USERDATA *data) |
| void | DetachUserData (USERDATA *data) |
| void | DisposeOfContents () |
| const MIUNICODE * | GetAltName () const |
| double * | GetArray () const |
| int | GetArrayNumCols () const |
| int | GetArrayNumLins () const |
| const CLASS * | GetClass () const |
| int | GetFieldNumber () const |
| int | GetFieldType () const |
| CLASS * | GetFormalParameterClass (int parmnum) const |
| SYMBOL * | GetFormalParameterSymbol (int parmnum) const |
| int | GetFormalParameterType (int parmnum) const |
| const MIUNICODE * | GetName () const |
| const SYMBOL * | GetNext () const |
| SYMBOL * | GetNext () |
| int | GetObject (TINOBJECT **pObj, bool UndefinedOK=false) |
| int | GetObject (CADOBJECT **pObj, bool UndefinedOK=false) |
| int | GetObject (VECTOROBJECT **pObj, bool UndefinedOK=false) |
| int | GetObject (RASTEROBJECT **pObj, bool UndefinedOK=false) |
| int | GetObject (OBJECT **pObj, bool UndefinedOK=false) |
| const TABLEDATA * | GetTableData () const |
| int | GetTableNumber () const |
| STYPE | GetType () const |
| const char * | GetTypeName () const |
| USERDATA * | GetUserData (USERDATA::TAG tag) |
| bool | GetValue (MISTRING &value) const |
| bool | GetValue (double &value) const |
| double | GetValueDouble () const |
| OBJECT * | GetValueObj () const |
| void * | GetValuePtr () const |
| char * | GetValueStr (char *fmt, char *buf, int maxlen) const |
| STRING * | GetValueSTRING () const |
| MIUNICODE * | GetValueUnicode (char *fmt, MIUNICODE *buf, int maxlen) const |
| int | IsNULL () const |
| bool | IsOptionalArgument () const |
| bool | IsPermanent () const |
| ERRVALUE | ResizeArray (int numlines, int numcols, bool bKeep=false) |
| ERRVALUE | ResizeArray (int numcols) |
| void | SetArray (double *data, int numrows, int numcols) |
| void | SetObjectElement (int ElemType, INT32 ElemNum) |
| void | SetRasterLinCol (int lin, int col) |
| void | SetType (STYPE type) |
| ERRVALUE | SetValue (const char *string) |
| int | SetValue (double value) |
| void | SetValue (OBJECT *) |
| ERRVALUE | SetValue (const MIUNICODE *string) |
| int | SetValueNULL () |
| void | SetValuePtr (void *val) |
Private Member Functions |
| void | SetValuePtr (OBJECT *val) |
Detailed Description
Class for representing variables and functions in SML.
Note: This class must not have virtual functions and the members need to stay the same size and in the same order. Any new members must be added to the end.
Member Enumeration Documentation
- Enumerator:
| SCOPE_NONE |
|
| SCOPE_TABLE |
|
| SCOPE_BFUNCTION |
|
| SCOPE_KEYWORD |
|
| SCOPE_GLOBAL |
|
| SCOPE_LOCAL |
|
| SCOPE_PERMANENT |
|
| SCOPE_PROTOTYPE |
|
| SCOPE_STATIC |
|
Member Function Documentation
| void SML::SYMBOL::AttachUserData |
( |
USERDATA * |
data |
) |
[inline] |
Attach some User Data to the symbol.
The data to be attached must be derived from SML::USERDATA, and must have been allocated via "new". Once attached to the symbol, the symbol owns the data and will "delete" it when the symbol is deleted. Also, if you try to attach something for a user ID that's already in use, it will delete the existing thing.
| void SML::SYMBOL::DetachUserData |
( |
USERDATA * |
data |
) |
[inline] |
Unattach some User Data from the symbol.
If the data to be unattached isn't attached, it just ignores you. Once unattached, the data is yours to do with as you wish. You are responsible for deleting it too.
| void SML::SYMBOL::DisposeOfContents |
( |
|
) |
|
Get the User Data attached to a symbol.
| const MIUNICODE* SML::SYMBOL::GetAltName |
( |
|
) |
const |
Get the alternative symbol name.
This is used for symbols pointing to RVC tables and fields which may have both long names and short names. In that case, the "Alt" name is the long name. If there is no alternative name, this just returns the normal name.
| double* SML::SYMBOL::GetArray |
( |
|
) |
const |
| int SML::SYMBOL::GetArrayNumCols |
( |
|
) |
const |
| int SML::SYMBOL::GetArrayNumLins |
( |
|
) |
const |
| const CLASS* SML::SYMBOL::GetClass |
( |
|
) |
const |
Returns the class pointer if the symbol is a CLASS.
| int SML::SYMBOL::GetFieldNumber |
( |
|
) |
const |
Get the field number for this symbol.
This only applies to symbols of STYPE_StrField or STYPE_NumField
| int SML::SYMBOL::GetFieldType |
( |
|
) |
const |
Return the DBFIELDTYPE of the field (if the symbol refers to a field).
Note, the return value may be undefined gibberish if the symbol does not refer to an STYPE_StrField or STYPE_NumField
| CLASS* SML::SYMBOL::GetFormalParameterClass |
( |
int |
parmnum |
) |
const |
Return the SML::CLASS of the Nth argument of a function.
If the symbol is for a built-in function, this method will return the SML::CLASS of the Nth parameter, or NULL if the Nth parameter isn't a class
| SYMBOL* SML::SYMBOL::GetFormalParameterSymbol |
( |
int |
parmnum |
) |
const |
Return the SML::SYMBOL of the Nth argument of a function.
If the symbol is for a built-in function, this method will return the symbol of the Nth argument at runtime.
| int SML::SYMBOL::GetFormalParameterType |
( |
int |
parmnum |
) |
const |
Return the type of the Nth argument of a function.
| const MIUNICODE* SML::SYMBOL::GetName |
( |
|
) |
const |
| const SYMBOL* SML::SYMBOL::GetNext |
( |
|
) |
const |
Get the next symbol in the linked list (const).
| SYMBOL* SML::SYMBOL::GetNext |
( |
|
) |
|
Get the next symbol in the linked list.
| int SML::SYMBOL::GetObject |
( |
TINOBJECT ** |
pObj, |
|
|
bool |
UndefinedOK = false | |
|
) |
| | |
| int SML::SYMBOL::GetObject |
( |
CADOBJECT ** |
pObj, |
|
|
bool |
UndefinedOK = false | |
|
) |
| | |
| int SML::SYMBOL::GetObject |
( |
VECTOROBJECT ** |
pObj, |
|
|
bool |
UndefinedOK = false | |
|
) |
| | |
| int SML::SYMBOL::GetObject |
( |
RASTEROBJECT ** |
pObj, |
|
|
bool |
UndefinedOK = false | |
|
) |
| | |
| int SML::SYMBOL::GetObject |
( |
OBJECT ** |
pObj, |
|
|
bool |
UndefinedOK = false | |
|
) |
| | |
| const TABLEDATA* SML::SYMBOL::GetTableData |
( |
|
) |
const |
Get the SML::TABLEDATA for this symbol.
This only applies to symbols of STYPE_Table, STYPE_StrField or STYPE_NumField Will return NULL for other types of symbols.
| int SML::SYMBOL::GetTableNumber |
( |
|
) |
const |
Get the table number for this symbol.
This only applies to symbols of STYPE_Table, STYPE_StrField or STYPE_NumField
| STYPE SML::SYMBOL::GetType |
( |
|
) |
const |
| const char* SML::SYMBOL::GetTypeName |
( |
|
) |
const |
If no data for the given id is attached, it will just return NULL .
Do not free the data returned unless you Unattach it first.
| bool SML::SYMBOL::GetValue |
( |
MISTRING & |
value |
) |
const |
Get value as MISTRING.
- Returns:
- true if symbol has a falue, false if not leaves value unchanged if symbol does not have a value
| bool SML::SYMBOL::GetValue |
( |
double & |
value |
) |
const |
Get value as 'double'.
- Returns:
- true if symbol has a falue, false if not leaves value unchanged if symbol does not have a value
| double SML::SYMBOL::GetValueDouble |
( |
|
) |
const |
| OBJECT* SML::SYMBOL::GetValueObj |
( |
|
) |
const |
| void* SML::SYMBOL::GetValuePtr |
( |
|
) |
const |
| char* SML::SYMBOL::GetValueStr |
( |
char * |
fmt, |
|
|
char * |
buf, |
|
|
int |
maxlen | |
|
) |
| | const |
| STRING* SML::SYMBOL::GetValueSTRING |
( |
|
) |
const |
| int SML::SYMBOL::IsNULL |
( |
|
) |
const |
Returns true if the symbol represents a NULL value.
| bool SML::SYMBOL::IsOptionalArgument |
( |
|
) |
const |
Returns true if the symbol is an optional function argument.
| bool SML::SYMBOL::IsPermanent |
( |
|
) |
const |
| ERRVALUE SML::SYMBOL::ResizeArray |
( |
int |
numlines, |
|
|
int |
numcols, |
|
|
bool |
bKeep = false | |
|
) |
| | |
| ERRVALUE SML::SYMBOL::ResizeArray |
( |
int |
numcols |
) |
|
| void SML::SYMBOL::SetArray |
( |
double * |
data, |
|
|
int |
numrows, |
|
|
int |
numcols | |
|
) |
| | |
| void SML::SYMBOL::SetObjectElement |
( |
int |
ElemType, |
|
|
INT32 |
ElemNum | |
|
) |
| | |
| void SML::SYMBOL::SetRasterLinCol |
( |
int |
lin, |
|
|
int |
col | |
|
) |
| | |
| void SML::SYMBOL::SetType |
( |
STYPE |
type |
) |
|
| ERRVALUE SML::SYMBOL::SetValue |
( |
const char * |
string |
) |
|
Set string symbol value (char*).
- Parameters:
-
| int SML::SYMBOL::SetValue |
( |
double |
value |
) |
|
Set numeric symbol value (double).
| void SML::SYMBOL::SetValue |
( |
OBJECT * |
|
) |
|
Set the value of the symbol to the given object.
Only do this if the symbol is already an object symbol
Set string symbol value (MIUNICODE*).
- Parameters:
-
| int SML::SYMBOL::SetValueNULL |
( |
|
) |
|
Set the value to IEEE_NaN.
| void SML::SYMBOL::SetValuePtr |
( |
OBJECT * |
val |
) |
[private] |
| void SML::SYMBOL::SetValuePtr |
( |
void * |
val |
) |
|
The documentation for this class was generated from the following file: