(
void);
78 switch(
info.GetTypeFamily()) {
80cout <<
"ERROR: unknown type family"<< endl;
103 stringoff(
offset,
' ');
104cout << off <<
"primitive: ";
110cout <<
"boolean: "<<
info.GetPrimitiveValueBool();
113cout <<
"char: "<<
info.GetPrimitiveValueChar();
116cout << (
info.IsPrimitiveValueSigned() ?
"signed":
"unsigned")
118<<
info.GetPrimitiveValueInt8();
121cout <<
"float: "<<
info.GetPrimitiveValueDouble();
124cout <<
"string: "<<
info.GetPrimitiveValueString();
131cout <<
" integer: ";
133cout << values.
FindName(
info.GetPrimitiveValueInt(),
true);
137cout <<
"octetstring: ??";
140cout <<
"bitstring: ??";
146cout <<
"other: ??";
155 stringoff(
offset,
' ');
156cout << off <<
"class: "<<
info.GetName() <<
" {"<< endl;
158 while(mem.
Valid()) {
165cout <<
": not set"<< endl;
169cout << off <<
"} end of class: "<<
info.GetName() << endl;
175 stringoff(
offset,
' ');
176cout << off <<
"choice: "<<
info.GetName() <<
" {"<< endl;
178cout << off <<
" ["<<
info.GetCurrentChoiceVariantIndex() <<
"]: " 182cout << off <<
"} end of choice: "<<
info.GetName() << endl;
188 stringoff(
offset,
' ');
189cout << off <<
"container: "<<
info.GetName() <<
" {"<< endl;
191 while(e.
Valid()) {
192cout << off <<
" ["<< e.
GetIndex() <<
"]: "<< endl;
196cout << off <<
"} end of container: "<<
info.GetName() << endl;
202 stringoff(
offset,
' ');
203cout << off <<
"pointer: "<<
info.GetName() << endl;
208 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 WalkContainer(size_t offset, const CConstObjectInfo &info)
void WalkPrimitive(size_t offset, const CConstObjectInfo &info)
virtual int Run(void)
Run the application.
void WalkClass(size_t offset, const CConstObjectInfo &info)
void WalkPointer(size_t offset, const CConstObjectInfo &info)
void WalkChoice(size_t offset, const CConstObjectInfo &info)
virtual int Run(void)
Run the application.
void Dispatch(size_t offset, const CConstObjectInfo &info)
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.
const string & FindName(TEnumValueType value, bool allowBadValue) const
Find name of the enum by its numeric value.
const CMemberId & GetId(void) const
const string & GetName(void) const
bool IsInteger(void) const
Check whether the type is defined as INTEGER in ASN.1 spec.
EPrimitiveValueType
Primitive value type.
virtual const CTypeInfo * GetThisTypeInfo(void) const =0
#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.
bool Valid(void) const
Is iterator valid.
TMemberIndex GetMemberIndex(void) const
Get index of the member in the class.
const CItemInfo * GetItemInfo(void) const
bool IsSet(void) const
Is member assigned a value.
CConstObjectInfo GetVariant(void) const
Get variant data.
TMemberIndex GetIndex(void) const
Get index of the element in the container.
CConstObjectInfo GetMember(void) const
Get class member data.
const CVariantInfo * GetVariantInfo(void) const
CConstObjectInfo GetElement(void) const
Get element data and type information.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
Magic spell ;-) needed for some weird compilers... very empiric.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
std::istream & in(std::istream &in_, double &x_)
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