A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/choiceptrstr_8cpp_source.html below:

NCBI C++ ToolKit: src/serial/datatool/choiceptrstr.cpp Source File

Go to the documentation of this file.

Go to the SVN repository for this file.

45 #define STATE_ENUM "E_Choice" 46 #define STATE_PREFIX "e_" 47 #define STATE_NOT_SET "e_not_set" 48 #define REFCHOICE_TYPE_METHOD "GetRefChoiceTypeInfo" 51  const string

& className,

52  const string

& namespaceName,

55

:

CParent

(externalName, className, namespaceName, dataType, comments)

73  const string

& methodPrefix,

75  const string

& classPrefix)

const 79

codeClassName +=

"_Base"

;

83  i

->type->GeneratePointerTypeCode(

code

);

89  string

ncbiNamespace =

92  code

.ClassPublic() <<

98  code

.ClassPublic() <<

99  " // choice state enum\n" 103  code

.ClassPublic() <<

",\n" 106  code

.ClassPublic() <<

"\n" 112  code

.ClassPublic() <<

113  " // return selection name (for diagnostic purposes)\n" 114  " static "

<<stdNamespace<<

"string SelectionName(" STATE_ENUM " index);\n" 118  code

.ClassPrivate() <<

119  " static const char* const sm_SelectionNames[];\n"

;

122  "const char* const "

<<methodPrefix<<

"sm_SelectionNames[] = {\n" 125  code

.Methods() <<

",\n" 126  " \""

<<

i

->externalName<<

"\""

;

128  code

.Methods() <<

"\n" 131  "NCBI_NS_STD::string "

<<methodPrefix<<

"SelectionName(" STATE_ENUM " index)\n" 133  " return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0]));\n" 140  code

.ClassPublic() <<

141  " // variants' types\n"

;

143  code

.ClassPublic() <<

144  " typedef "

<<

i

->type->GetCType(

code

.GetNamespace())<<

" T"

<<

i

->cName<<

";\n"

;

146  code

.ClassPublic() <<

154  code

.Methods() <<

"BEGIN_NAMED_ABSTRACT_BASE_CLASS_INFO"

;

156  code

.Methods() <<

"BEGIN_NAMED_ABSTRACT_CLASS_INFO"

;

163  " ADD_NAMED_SUB_CLASS(\""

<<

i

->externalName<<

"\", "

<<

i

->type->GetCType(

code

.GetNamespace())<<

");\n"

;

177  " return NCBI_NS_NCBI::CChoicePointerTypeInfo::GetTypeInfo(NCBI_NS_NCBI::CRefTypeInfo<"

<<

179  "::GetTypeInfo()));\n"

#define REFCHOICE_TYPE_METHOD

virtual string GetRef(const CNamespace &ns) const override

CChoicePtrRefTypeStrings(CTypeStrings *type)

virtual void GenerateClassCode(CClassCode &code, CNcbiOstream &getters, const string &methodPrefix, bool haveUserClass, const string &classPrefix) const override

CChoicePtrTypeStrings(const string &globalName, const string &className, const string &namespaceName, const CDataType *dataType, const CComments &comments)

list< SVariantInfo > TVariants

void AddVariant(const string &name, AutoPtr< CTypeStrings > type)

const string & GetExternalName(void) const

const string & GetClassNameDT(void) const

static string GetSourceDataSpecString(void)

static const CNamespace KNCBINamespace

static const CNamespace KSTDNamespace

virtual string GetRef(const CNamespace &ns) const override

Include a standard set of the NCBI C++ Toolkit most basic headers.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

const TMemberIndex kEmptyChoice

Special value for marking empty choice.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

string Identifier(const string &typeName, bool capitalize)

SVariantInfo(const string &name, AutoPtr< CTypeStrings > type)


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