Class for struct type. More...
#include <TypeCode.hxx>


Public Member Functions | |
| TypeCodeStruct (const char *repositoryId, const char *name) | |
| Create a struct type with a given name and a given id. More... | |
| TypeCode * | clone () const |
| void | putReprAtPlace (char *pt, const char *val, bool deepCpy) const |
| void | destroyZippedAny (char *data) const |
| AnyPtr | getOrBuildAnyFromZippedData (char *data) const |
| const char * | id () const |
| const char * | name () const |
| const char * | shortName () const |
| virtual unsigned | getSizeInByteOfAnyReprInSeq () const |
| const TypeCode * | contentType () const |
| virtual int | isA (const char *repositoryId) const |
| Check if this TypeCode is derived from a TypeCode with a given id. More... | |
| virtual int | isA (const TypeCode *tc) const |
| Check if this TypeCode is derived from a given TypeCode. More... | |
| virtual int | isAdaptable (const TypeCode *tc) const |
| Check if this TypeCode is adaptable to a given TypeCode (tc) More... | |
| virtual int | isEquivalent (const TypeCode *tc) const |
| Check if this TypeCode can be used in place of tc. More... | |
| virtual void | addMember (const std::string &name, TypeCode *tc) |
| The only non const method. More... | |
| const TypeCode * | getMember (const std::string &name, unsigned &offset) const |
| Get typecode of struct member given its name. More... | |
| int | memberCount () const |
| const char * | memberName (int index) const |
| TypeCode * | memberType (int index) const |
Public Member Functions inherited from YACS::ENGINE::TypeCode | |
| TypeCode (DynType kind) | |
| DynType | kind () const |
| const char * | getKindRepr () const |
| const TypeCode * | subContentType (int lev) const |
| virtual std::string | getPrintStr () const |
Public Member Functions inherited from YACS::ENGINE::RefCounter | |
| unsigned int | getRefCnt () const |
| void | incrRef () const |
| bool | decrRef () const |
Protected Member Functions | |
| virtual | ~TypeCodeStruct () |
| TypeCodeStruct (const TypeCodeStruct &tc) | |
Protected Member Functions inherited from YACS::ENGINE::TypeCodeComposed | |
| TypeCodeComposed (const TypeCodeComposed &other) | |
| TypeCodeComposed (DynType kind, const char *repositoryId, const char *name) | |
Protected Member Functions inherited from YACS::ENGINE::TypeCode | |
| TypeCode (const TypeCode &tc) | |
| TypeCode & | operator= (const TypeCode &tc) |
| virtual | ~TypeCode () |
Protected Member Functions inherited from YACS::ENGINE::RefCounter | |
| RefCounter () | |
| RefCounter (const RefCounter &other) | |
| virtual | ~RefCounter () |
Private Attributes | |
| std::vector< std::pair< std::string, TypeCode * > > | _members |
Friends | |
| class | StructAny |
Additional Inherited Members | |
Static Public Member Functions inherited from YACS::ENGINE::TypeCode | |
| static const char * | getKindRepr (DynType kind) |
| static TypeCode * | interfaceTc (const char *id, const char *name) |
| static factory of object reference type given an id and a name More... | |
| static TypeCode * | interfaceTc (const char *id, const char *name, const std::list< TypeCodeObjref * > <c) |
| static factory of object reference type given an id, a name and a list of base types More... | |
| static TypeCode * | sequenceTc (const char *id, const char *name, TypeCode *content) |
| static factory of sequence type given an id, a name and a content type More... | |
| static TypeCode * | structTc (const char *id, const char *name) |
| static factory of struct type given an id and a name More... | |
Static Public Attributes inherited from YACS::ENGINE::RefCounter | |
| static unsigned int | _totalCnt =0 |
Protected Attributes inherited from YACS::ENGINE::TypeCodeComposed | |
| const std::string | _name |
| const std::string | _repoId |
| std::string | _shortName |
Protected Attributes inherited from YACS::ENGINE::TypeCode | |
| const DynType | _kind |
Protected Attributes inherited from YACS::ENGINE::RefCounter | |
| unsigned int | _cnt |
Static Protected Attributes inherited from YACS::ENGINE::TypeCode | |
| static const char * | KIND_STR_REPR [] ={ "None", "double", "int", "string", "bool", "Objref", "Sequence", "Array","Struct" } |
Class for struct type.
Definition at line 227 of file TypeCode.hxx.
| TypeCodeStruct::TypeCodeStruct | ( | const char * | repositoryId, |
| const char * | name | ||
| ) |
Create a struct type with a given name and a given id.
| repositoryId | : the given id |
| name | : the given name |
Definition at line 644 of file TypeCode.cxx.
Referenced by clone().
|
protectedvirtual |
Definition at line 649 of file TypeCode.cxx.
References _members.
|
protected |
Definition at line 660 of file TypeCode.cxx.
References _members, and YACS::ENGINE::RefCounter::incrRef().
|
virtual |
The only non const method.
Definition at line 781 of file TypeCode.cxx.
References _members, DEBTRACE, YACS::ENGINE::RefCounter::incrRef(), YACS::ENGINE::TypeCode::name(), and name().
Referenced by YACS::ENGINE::Runtime::Runtime().
|
virtual |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 655 of file TypeCode.cxx.
References TypeCodeStruct().
|
virtual |
|
virtual |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 671 of file TypeCode.cxx.
References YACS::ENGINE::StructAny::destroyReprAtPlace().
| const TypeCode * TypeCodeStruct::getMember | ( | const std::string & | name, |
| unsigned & | offset | ||
| ) | const |
Get typecode of struct member given its name.
If name is not an existing key, 0 is returned.
| name | : the member name |
| offset | : Out parameter, that specified the location of start of data discriminated by name key. |
Definition at line 801 of file TypeCode.cxx.
References _members, YACS::ENGINE::TypeCode::getSizeInByteOfAnyReprInSeq(), and name().
Referenced by YACS::ENGINE::StructAny::setEltAtRank().
|
virtual |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 676 of file TypeCode.cxx.
References YACS::ENGINE::StructAny::getOrBuildFromData().
|
virtual |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 696 of file TypeCode.cxx.
References _members.
|
virtual |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 681 of file TypeCode.cxx.
References YACS::ENGINE::TypeCodeComposed::_repoId.
|
virtual |
Check if this TypeCode is derived from a TypeCode with a given id.
| id | : a given id |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 715 of file TypeCode.cxx.
References YACS::ENGINE::TypeCodeComposed::_repoId.
Referenced by isA().
|
virtual |
Check if this TypeCode is derived from a given TypeCode.
| tc | : the given TypeCode |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 726 of file TypeCode.cxx.
References YACS::ENGINE::TypeCode::_kind, YACS::ENGINE::TypeCodeComposed::_repoId, yacsorb.CORBAEngineTest::i, YACS::ENGINE::TypeCode::id(), isA(), YACS::ENGINE::TypeCode::kind(), memberCount(), memberName(), memberType(), and name().
|
virtual |
Check if this TypeCode is adaptable to a given TypeCode (tc)
| tc | : the given TypeCode |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 746 of file TypeCode.cxx.
References YACS::ENGINE::TypeCode::_kind, YACS::ENGINE::TypeCodeComposed::_repoId, yacsorb.CORBAEngineTest::i, YACS::ENGINE::TypeCode::id(), YACS::ENGINE::TypeCode::kind(), memberCount(), memberName(), memberType(), and name().
|
virtual |
Check if this TypeCode can be used in place of tc.
this TypeCode is equivalent to tc if they have the same kind
| tc | : the TypeCode to compare |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 767 of file TypeCode.cxx.
References YACS::ENGINE::TypeCode::_kind, yacsorb.CORBAEngineTest::i, YACS::ENGINE::TypeCode::kind(), memberCount(), memberName(), memberType(), and name().
| int TypeCodeStruct::memberCount | ( | ) | const |
Definition at line 814 of file TypeCode.cxx.
References _members.
Referenced by YACS::ENGINE::checkStruct< PYTHONImpl, PyObject *, void * >(), YACS::ENGINE::convertToYacsStruct< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertFromYacsStruct< CORBAImpl, CORBA::Any * >::convert(), YACS::ENGINE::convertToYacsStruct< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertToYacsStruct< NEUTRALImpl, YACS::ENGINE::Any *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::VisitorSaveSchema::dumpTypeCode(), YACS::ENGINE::getCorbaTCStruct(), isA(), isAdaptable(), and isEquivalent().
| const char * TypeCodeStruct::memberName | ( | int | index | ) | const |
Definition at line 819 of file TypeCode.cxx.
References _members.
Referenced by YACS::ENGINE::checkStruct< PYTHONImpl, PyObject *, void * >(), YACS::ENGINE::convertToYacsStruct< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertFromYacsStruct< CORBAImpl, CORBA::Any * >::convert(), YACS::ENGINE::convertToYacsStruct< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertToYacsStruct< NEUTRALImpl, YACS::ENGINE::Any *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::VisitorSaveSchema::dumpTypeCode(), YACS::ENGINE::getCorbaTCStruct(), isA(), isAdaptable(), and isEquivalent().
| TypeCode * TypeCodeStruct::memberType | ( | int | index | ) | const |
Definition at line 831 of file TypeCode.cxx.
References _members.
Referenced by YACS::ENGINE::checkStruct< PYTHONImpl, PyObject *, void * >(), YACS::ENGINE::convertToYacsStruct< CORBAImpl, CORBA::Any *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertToYacsStruct< PYTHONImpl, PyObject *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertToYacsStruct< XMLImpl, xmlDocPtr, xmlNodePtr, IMPLOUT, TOUT >::convert(), YACS::ENGINE::convertToYacsStruct< NEUTRALImpl, YACS::ENGINE::Any *, void *, IMPLOUT, TOUT >::convert(), YACS::ENGINE::VisitorSaveSchema::dumpTypeCode(), YACS::ENGINE::getCorbaTCStruct(), isA(), isAdaptable(), and isEquivalent().
|
virtual |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 686 of file TypeCode.cxx.
References YACS::ENGINE::TypeCodeComposed::_name.
Referenced by addMember(), getMember(), isA(), isAdaptable(), and isEquivalent().
|
virtual |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 666 of file TypeCode.cxx.
References YACS::ENGINE::StructAny::putReprAtPlace().
|
virtual |
Reimplemented from YACS::ENGINE::TypeCode.
Definition at line 691 of file TypeCode.cxx.
References YACS::ENGINE::TypeCodeComposed::_shortName.
|
friend |
Definition at line 229 of file TypeCode.hxx.
|
private |
Definition at line 257 of file TypeCode.hxx.
Referenced by addMember(), YACS::ENGINE::StructAny::destroyReprAtPlace(), getMember(), getSizeInByteOfAnyReprInSeq(), memberCount(), memberName(), memberType(), YACS::ENGINE::StructAny::operator==(), YACS::ENGINE::StructAny::operator[](), YACS::ENGINE::StructAny::putMyReprAtPlace(), YACS::ENGINE::StructAny::putReprAtPlace(), YACS::ENGINE::StructAny::StructAny(), TypeCodeStruct(), YACS::ENGINE::StructAny::~StructAny(), and ~TypeCodeStruct().