(
void);
82 switch(
info.GetTypeFamily()) {
84cout <<
"ERROR: unknown type family"<< endl;
111cout <<
"special"<< endl;
114 info.SetPrimitiveValueBool(
true);
117 info.SetPrimitiveValueChar(
'X');
120 info.SetPrimitiveValueInt(123 +
depth);
123 info.SetPrimitiveValueDouble(123.456 +
depth);
126 info.SetPrimitiveValueString(
"xxx");
132CEnumeratedTypeValues::TValues::const_iterator v =
all.begin();
133 if(
all.size() > 1) {
136 if(
all.size() > 2) {
139 info.SetPrimitiveValueInt(v->second);
143cout <<
"octet string"<< endl;
146cout <<
"bitstring"<< endl;
149cout <<
"any"<< endl;
152cout <<
"other"<< endl;
160 stringoff(
offset,
' ');
161cout << off <<
"class: "<<
info.GetName() <<
" {"<< endl;
163 for( ; mem.
Valid(); ++mem) {
174cout << off <<
"} end of "<<
info.GetName() << endl;
186 stringoff(
offset,
' ');
187cout << off <<
"choice: "<<
info.GetName() <<
" {"<< endl;
188cout << off <<
" ["<< ind <<
"]: " 189<<
info.GetVariantIterator(ind).GetVariantInfo()->GetId().GetName()
193cout << off <<
"} end of "<<
info.GetName() << endl;
199 stringoff(
offset,
' ');
200cout << off <<
"container of: "<<
info.GetName() <<
" {"<< endl;
201 for(
int i=0;
i<2; ++
i) {
210cout << off <<
"} end of "<<
info.GetName() << endl;
221 int main(
intargc,
const char* argv[])
int main(int argc, const char *argv[])
Derive our application class from CwxNCBIApp and use it together with standard CNCBIwxApplication.
void SetClass(int depth, size_t offset, CObjectInfo &info)
void SetChoice(int depth, size_t offset, CObjectInfo &info)
virtual int Run(void)
Run the application.
void SetPrimitive(int depth, size_t offset, CObjectInfo &info)
void SetDispatch(int depth, size_t offset, CObjectInfo &info)
void SetPointer(int depth, size_t offset, CObjectInfo &info)
void SetContainer(int depth, size_t offset, CObjectInfo &info)
virtual int Run(void)
Run the application.
static unsigned char depth[2 *(256+1+29)+1]
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
list< pair< string, TEnumValueType > > TValues
bool Optional(void) const
const CMemberId & GetId(void) const
const string & GetName(void) const
const TValues & GetValues(void) const
Get the list of name-value pairs.
size_t TMemberIndex
Type used for indexing class members and choice variants.
EPrimitiveValueType
Primitive value type.
#define MSerial_AsnText
I/O stream manipulators â.
@ ePrimitiveValueSpecial
null, void
@ ePrimitiveValueOctetString
vector<(signed|unsigned)? char>
@ ePrimitiveValueString
string|char*|const char*
@ ePrimitiveValueInteger
(signed|unsigned) (char|short|int|long)
@ ePrimitiveValueChar
char
@ ePrimitiveValueBool
bool
@ ePrimitiveValueEnum
enum
@ ePrimitiveValueReal
float|double
@ ePrimitiveValueBitString
bool Valid(void) const
Is iterator valid.
TMemberIndex GetMemberIndex(void) const
Get index of the member in the class.
pair< TObjectPtr, TTypeInfo > ObjectInfo(C &obj)
const CMemberInfo * GetMemberInfo(void) const
Magic spell ;-) needed for some weird compilers... very empiric.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4