UNIVERS
15.3
UNIVERS base processing software API
|
#include <RecDef.hpp>
Public Member Functions | |
RecDef (const char *rtname, const DomainAr &dmns) | |
RecDef (const char *rtname, int dmns_n, const DomainDef *dmns) | |
RecDef (const RecDef &rdef) | |
RecDef (const char *rtname, const RecDef &rdef1, const RecDef &rdef2) | |
RecDef (InputStream &ist) | |
virtual | ~RecDef () |
const char * | record_name () const |
size_t | record_size () const |
unsigned | domain_count () const |
int | n2i (const char *dname) const |
void * | offset (int dmn_i, const void *base) const |
const DomainDef & | domain_def (int dmn_i) const |
DomainDef * | domain_defs () const |
void | set_options (int dmn_i, void *options) |
virtual void | serialize (OutputStream &ost) const |
virtual void | deserialize (InputStream &ist) |
virtual void | add_domain (const DomainDef &dmn) |
bool | operator== (const RecDef &rdef) const |
bool | operator!= (const RecDef &rdef) const |
bool | check_domain (const char *dname) const |
bool | check_domain (const char *dname, AtomType atype, unsigned dim=1) const |
Public Member Functions inherited from SerialThis | |
SerialThis () | |
SerialThis (InputStream &ist) | |
Protected Member Functions | |
RecDef (RecDef *rdef) | |
RecDef () | |
void | constructor (const char *rtname, const DomainAr &dmns) |
Record definition object.
Record is a structure of named fields. Each field has predefined label (called name), type and other properties such as dimension, category etc.
RecDef::RecDef | ( | const char * | rtname, |
const DomainAr & | dmns | ||
) |
Define record type exactly by pointing its name (may be ""), and number of domains
RecDef::RecDef | ( | const char * | rtname, |
int | dmns_n, | ||
const DomainDef * | dmns | ||
) |
Define record type exactly by pointing its name (may be ""), and number of domains
RecDef::RecDef | ( | const RecDef & | rdef | ) |
Create copy of the record type
Create composition of two record types. First one is a favorite one in case of resolving the same domain name conflicts.
RecDef::RecDef | ( | InputStream & | ist | ) |
Acquire name and domains definition from an input stream
|
virtual |
Destroy the record definition
|
protected |
Get the foreign pointer to domains definition
|
protected |
Create empty record with caller obligation to call constructor() just before first usage of class facilities
|
virtual |
bool RecDef::check_domain | ( | const char * | dname | ) | const |
Check domain name existence.
bool RecDef::check_domain | ( | const char * | dname, |
AtomType | atype, | ||
unsigned | dim = 1 |
||
) | const |
Check domain name existence with given type and dimension.
|
protected |
Provides the same functionality as the constructor with the same signature.
|
virtual |
Get the record definition from given stream
Reimplemented from SerialThis.
unsigned RecDef::domain_count | ( | ) | const |
Get number of domains
const DomainDef& RecDef::domain_def | ( | int | dmn_i | ) | const |
Navigate through the record domains via domain index
DomainDef* RecDef::domain_defs | ( | ) | const |
Allocate array of domain definitions via operator new.
int RecDef::n2i | ( | const char * | dname | ) | const |
Domain name to domain index in the record method
void* RecDef::offset | ( | int | dmn_i, |
const void * | base | ||
) | const |
Return computed offset to record cell from the base address
|
inline |
Return FALSE in case of two records are exactly equal (name,atype,dim,categ; record_name() may differ) and TRUE otherwise.
bool RecDef::operator== | ( | const RecDef & | rdef | ) | const |
Return TRUE in case of two records are exactly equal (name,atype,dim,categ; record_name() may differ) and FALSE otherwise.
const char* RecDef::record_name | ( | ) | const |
Get name of the record type or "" in anonymous
size_t RecDef::record_size | ( | ) | const |
Get record size in bytes
|
virtual |
Put the record definition to given stream
Reimplemented from SerialThis.
void RecDef::set_options | ( | int | dmn_i, |
void * | options | ||
) |
Setup options for given domain