EbaseDef

EbaseDef is a class that let apps to construct a definition used to created Ebase database file. It can also be used to query the structure of an existing Ebase database.

[ ebase_lib | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

IMPORTANT

Class Summary

class EbaseDef :
{
public:
EbaseDef();
void AddField(const char * fieldName, EbDataType dataType, EbUint32 flag );
void InsertField(EbUint32 pos, const char * fieldName, EbDataType dataType, EbUint32 flag );
EbUint32 NumberOfFields();
const char * GetFieldName(EbUint32 fieldId);
EbDataType GetFieldDataType(EbUint32 fieldId);
EbUint32 GetFieldFlag(EbUint32 fieldId);
EbInt32 GetFieldId(const char *fieldName);
void DeleteAll() ;
protected:
}; // EbaseDef

Back to the top of EbaseDef


IMPORTANT

Notice that in the current implementation the definition of an existing database is not modifiable.

Back to the top of EbaseDef


EbaseDef();

Constructor.

    EbaseDef();

Back to the top of EbaseDef


void AddField(const char * fieldName, EbDataType dataType, EbUint32 flag );

Add one field to the definition. This function will make separate copy of the fieldName string.

Parameters :

in fieldName
The field name.
in dataType
The data type of the field.
in flag
Not used for now. It must be 0.

    void AddField(const char * fieldName,
                  EbDataType dataType,
                  EbUint32 flag = 0);

Back to the top of EbaseDef


void InsertField(EbUint32 pos, const char * fieldName, EbDataType dataType, EbUint32 flag );

Insert a field at the specified location.

Parameters :

in pos
The position at which to insert the new field.
in fieldName
The field name.
in dataType
The data type of the field.
in flag
Not used for now. It must be 0.

    void InsertField(EbUint32 pos,
                     const char * fieldName,
                     EbDataType dataType,
                     EbUint32 flag = 0);

Back to the top of EbaseDef


EbUint32 NumberOfFields();

Report the number of fields in the definition.

Return value : The number of fields.

    EbUint32 NumberOfFields();

Back to the top of EbaseDef


const char * GetFieldName(EbUint32 fieldId);

Get the field name by field index.

Parameters :

in fieldId
Must be in the range [0, numFields-1].

Return value : Pointer to the string that represents the field name. Note: Caller needs to copy the string to a separate place if it wants to have its own copy.

Exceptions : EBE_INVALID_FIELD

    const char * GetFieldName(EbUint32 fieldId);

Back to the top of EbaseDef


EbDataType GetFieldDataType(EbUint32 fieldId);

Get the field data type.

Parameters :

in fieldId
Must be in the range [0, numFields-1].

Return value : Data type.

Exceptions : EBE_INVALID_FIELD

    EbDataType GetFieldDataType(EbUint32 fieldId);

Back to the top of EbaseDef


EbUint32 GetFieldFlag(EbUint32 fieldId);

Get the field flag.

Parameters :

in fieldId
Must be in the range [0, numFields-1].

Return value : field flag.

Exceptions : EBE_INVALID_FIELD

    EbUint32 GetFieldFlag(EbUint32 fieldId);

Back to the top of EbaseDef


EbInt32 GetFieldId(const char *fieldName);

Find the field index by field name.

Parameters :

in fieldName

Return value : The field index of the field. Or < 0 if not found.

    EbInt32 GetFieldId(const char *fieldName);

Back to the top of EbaseDef


void DeleteAll() ;

Remove all fields

    void DeleteAll()           ;

Function is currently defined inline.


Back to the top of EbaseDef


All Members

public:
void AddField(const char * fieldName, EbDataType dataType, EbUint32 flag );
void InsertField(EbUint32 pos, const char * fieldName, EbDataType dataType, EbUint32 flag );
EbUint32 NumberOfFields();
const char * GetFieldName(EbUint32 fieldId);
EbDataType GetFieldDataType(EbUint32 fieldId);
EbUint32 GetFieldFlag(EbUint32 fieldId);
EbInt32 GetFieldId(const char *fieldName);
void DeleteAll() ;
protected:

Back to the top of EbaseDef


Ancestors

Class does not inherit from any other class.

Back to the top of EbaseDef


Descendants

Class is not inherited by any others.

Back to the top of EbaseDef


Generated from source by the Cocoon utilities on Tue Aug 14 12:00:07 2001 .

Report problems to jkotula@vitalimages.com