choice->
index;
79choice->
index= index;
112 out<<
"SEQUENCE"<<
" {";
121TMembers::const_iterator
next=
i;
177 if(member.
Notag()) {
207 if(member.
Notag()) {
217(*att)->PrintJSONSchema(
out,
indent, req,
true);
227[](
const string& e) {
228return string(
"\"").append(e).append(
"\"");
245(*m)->GetType()->SetInChoice(
this);
259 value.Warning(
"CHOICE value expected", 11);
262 for( TMembers::const_iterator
i=
GetMembers().begin();
264 if( (*i)->GetName() == choice->
GetName() )
265 return(*i)->GetType()->CheckValue(choice->
GetValue());
272unique_ptr<CChoiceTypeInfo>
280 for( TMembers::const_iterator
i=
GetMembers().begin();
285typeInfo->AddMember(member->
GetName(),0,
293 if(member->
Notag()) {
298typeInfo->AddVariant(member->
GetName(), 0,
303 if(member->
Notag()) {
308typeInfo->AssignItemsTags();
317 stringalias =
GetVar(
"_fullalias");
324 "cannot create type info of _fullalias "+ alias);
333 code->SetFullAlias();
363 code->AddVariant((*i)->GetName(), varType);
372 boolhaveUserClass = rootClass;
373 code->SetHaveUserClass(haveUserClass);
374 code->SetObject(
true);
377 stringexternal_name = (*i)->GetName();
378 stringmember_name = (*i)->GetType()->DefClassMemberName();
379 if(member_name.empty()) {
380member_name = external_name;
382 booldelayed =
GetBoolVar((*i)->GetName()+
"._delay");
383 boolin_union =
GetBoolVar((*i)->GetName()+
"._in_union",
true);
384 code->AddVariant(external_name, member_name, varType, delayed, in_union,
385(*i)->GetType()->GetTag(),
387(*i)->SimpleType(),(*i)->GetType(),
389(*i)->GetType()->SetTypeStr(&(*
code));
void transform(Container &c, UnaryFunction *op)
static TMemberIndex GetIndexAnyTypeChoice(const CChoiceTypeInfo *, TConstObjectPtr choicePtr)
static void ResetIndexAnyTypeChoice(const CChoiceTypeInfo *, TObjectPtr choicePtr)
static void SetIndexAnyTypeChoice(const CChoiceTypeInfo *, TObjectPtr choicePtr, TMemberIndex index, CObjectMemoryPool *)
static TObjectPtr CreateAnyTypeChoice(TTypeInfo, CObjectMemoryPool *)
virtual bool CheckValue(const CDataValue &value) const override
void PrintJSONSchema(CNcbiOstream &out, int indent, list< string > &required, bool contents_only=false) const override
virtual CTypeInfo * CreateTypeInfo(void) override
virtual const char * GetASNKeyword(void) const override
virtual const char * XmlMemberSeparator(void) const override
virtual AutoPtr< CTypeStrings > GetFullCType(void) const override
virtual AutoPtr< CTypeStrings > GenerateCode(void) const override
virtual string GetSpecKeyword(void) const override
virtual void PrintASN(CNcbiOstream &out, int indent) const override
virtual void FixTypeTree(void) const override
virtual AutoPtr< CTypeStrings > GetRefCType(void) const override
virtual const char * GetDEFKeyword(void) const override
virtual void PrintASN(CNcbiOstream &out, int indent) const override
const TMembers & GetMembers(void) const
list< AutoPtr< CDataMember > > TMembers
virtual void FixTypeTree(void) const override
const string & GetName(void) const
CDataType * GetType(void)
void PrintJSONSchema(CNcbiOstream &out, int indent, list< string > &required, bool contents_only=false) const
void PrintASN(CNcbiOstream &out, int indent, bool last) const
string FileName(void) const
void SetParentClassTo(CClassTypeStrings &code) const
CComments & Comments(void)
const string & GlobalName(void) const
string ClassName(void) const
const string & GetNamespaceName(void) const
CDataType * ResolveGlobal(const string &name) const
const CDataType * GetParentType(void) const
virtual CTypeRef GetTypeInfo(void)
void SetTypeStr(CClassTypeStrings *TypeStr) const
bool HasExternalName(void) const
CTypeInfo * UpdateModuleName(CTypeInfo *typeInfo) const
bool GetBoolVar(const string &value, bool default_value=false) const
const CNamespace & Namespace(void) const
const string GetVar(const string &value, int collect=0) const
static bool IsASNDataSpec(void)
virtual AutoPtr< CTypeStrings > GetRefCType(void) const
const string & GetMemberName(void) const
const string & GetName(void) const
const CDataValue & GetValue(void) const
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
void SetDataType(const CDataType *type)
std::ofstream out("events_result.xml")
main entry point for tests
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
element_type * release(void)
Release will release ownership of pointer to caller.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
CMemberInfo * SetNoPrefix(void)
CMemberInfo * SetAttlist(void)
CVariantInfo * SetNotag(void)
CVariantInfo * SetNoPrefix(void)
CMemberInfo * SetNotag(void)
const TMemberIndex kEmptyChoice
Special value for marking empty choice.
size_t TMemberIndex
Type used for indexing class members and choice variants.
const void * TConstObjectPtr
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
double value_type
The numeric datatype used by the parser.
const GenericPointer< typename T::ValueType > T2 value
CNcbiOstream & PrintASNNewLine(CNcbiOstream &out, int indent)
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