38#ifndef INCLUDED_BLPAPI_SCHEMA
39#define INCLUDED_BLPAPI_SCHEMA
94typedef void *blpapi_SchemaTypeDefinition_t;
108blpapi_Name_t *blpapi_SchemaElementDefinition_name(
109 const blpapi_SchemaElementDefinition_t *field);
121const char *blpapi_SchemaElementDefinition_description(
122 const blpapi_SchemaElementDefinition_t *field);
134int blpapi_SchemaElementDefinition_status(
135 const blpapi_SchemaElementDefinition_t *field);
147blpapi_SchemaTypeDefinition_t *blpapi_SchemaElementDefinition_type(
148 const blpapi_SchemaElementDefinition_t *field);
158size_t blpapi_SchemaElementDefinition_numAlternateNames(
159 const blpapi_SchemaElementDefinition_t *field);
171blpapi_Name_t *blpapi_SchemaElementDefinition_getAlternateName(
172 const blpapi_SchemaElementDefinition_t *field,
size_t index);
188size_t blpapi_SchemaElementDefinition_minValues(
189 const blpapi_SchemaElementDefinition_t *field);
202size_t blpapi_SchemaElementDefinition_maxValues(
203 const blpapi_SchemaElementDefinition_t *field);
222int blpapi_SchemaElementDefinition_print(
223 const blpapi_SchemaElementDefinition_t *element,
224 blpapi_StreamWriter_t streamWriter,
240void blpapi_SchemaElementDefinition_setUserData(
241 blpapi_SchemaElementDefinition_t *field,
void *userdata);
255void *blpapi_SchemaElementDefinition_userData(
256 const blpapi_SchemaElementDefinition_t *field);
267blpapi_Name_t *blpapi_SchemaTypeDefinition_name(
268 const blpapi_SchemaTypeDefinition_t *type);
280const char *blpapi_SchemaTypeDefinition_description(
281 const blpapi_SchemaTypeDefinition_t *type);
293int blpapi_SchemaTypeDefinition_status(
294 const blpapi_SchemaTypeDefinition_t *type);
305int blpapi_SchemaTypeDefinition_datatype(
306 const blpapi_SchemaTypeDefinition_t *type);
317int blpapi_SchemaTypeDefinition_isComplexType(
318 const blpapi_SchemaTypeDefinition_t *type);
329int blpapi_SchemaTypeDefinition_isSimpleType(
330 const blpapi_SchemaTypeDefinition_t *type);
341int blpapi_SchemaTypeDefinition_isEnumerationType(
342 const blpapi_SchemaTypeDefinition_t *type);
354int blpapi_SchemaTypeDefinition_isComplex(
355 const blpapi_SchemaTypeDefinition_t *type);
367int blpapi_SchemaTypeDefinition_isSimple(
368 const blpapi_SchemaTypeDefinition_t *type);
380int blpapi_SchemaTypeDefinition_isEnumeration(
381 const blpapi_SchemaTypeDefinition_t *type);
393size_t blpapi_SchemaTypeDefinition_numElementDefinitions(
394 const blpapi_SchemaTypeDefinition_t *type);
416blpapi_SchemaElementDefinition_t *
417blpapi_SchemaTypeDefinition_getElementDefinition(
418 const blpapi_SchemaTypeDefinition_t *type,
419 const char *nameString,
420 const blpapi_Name_t *name);
433blpapi_SchemaElementDefinition_t *
434blpapi_SchemaTypeDefinition_getElementDefinitionAt(
435 const blpapi_SchemaTypeDefinition_t *type,
size_t index);
454int blpapi_SchemaTypeDefinition_print(
455 const blpapi_SchemaTypeDefinition_t *element,
456 blpapi_StreamWriter_t streamWriter,
472void blpapi_SchemaTypeDefinition_setUserData(
473 blpapi_SchemaTypeDefinition_t *element,
void *userdata);
487void *blpapi_SchemaTypeDefinition_userData(
488 const blpapi_SchemaTypeDefinition_t *element);
500blpapi_ConstantList_t *blpapi_SchemaTypeDefinition_enumeration(
501 const blpapi_SchemaTypeDefinition_t *element);
546class SchemaTypeDefinition;
599 blpapi_SchemaElementDefinition_t *d_impl_p;
691 std::ostream& stream,
int level = 0,
int spacesPerLevel = 4)
const;
706 blpapi_SchemaElementDefinition_t *impl()
const;
746 blpapi_SchemaTypeDefinition_t *d_impl_p;
884 std::ostream& stream,
int level = 0,
int spacesPerLevel = 4)
const;
941 blpapi_SchemaElementDefinition_t *handle)
950 return Name(blpapi_SchemaElementDefinition_name(d_impl_p));
955 return blpapi_SchemaElementDefinition_description(d_impl_p);
960 return blpapi_SchemaElementDefinition_status(d_impl_p);
971 return blpapi_SchemaElementDefinition_minValues(d_impl_p);
976 return blpapi_SchemaElementDefinition_maxValues(d_impl_p);
981 return blpapi_SchemaElementDefinition_numAlternateNames(d_impl_p);
986 blpapi_Name_t *alternateName
987 = blpapi_SchemaElementDefinition_getAlternateName(d_impl_p, index);
988 if (alternateName == 0) {
991 return Name(alternateName);
995 std::ostream& stream,
int level,
int spacesPerLevel)
const
997 blpapi_SchemaElementDefinition_print(d_impl_p,
1008 element.
print(stream, 0, -1);
1014 blpapi_SchemaElementDefinition_setUserData(d_impl_p, newUserData);
1019 return blpapi_SchemaElementDefinition_userData(d_impl_p);
1023inline blpapi_SchemaElementDefinition_t *SchemaElementDefinition::impl()
const
1033inline SchemaTypeDefinition::SchemaTypeDefinition(
1034 blpapi_SchemaTypeDefinition_t *handle)
1044 return blpapi_SchemaTypeDefinition_datatype(d_impl_p);
1049 return Name(blpapi_SchemaTypeDefinition_name(d_impl_p));
1054 return blpapi_SchemaTypeDefinition_description(d_impl_p);
1059 return blpapi_SchemaTypeDefinition_status(d_impl_p);
1064 return blpapi_SchemaTypeDefinition_numElementDefinitions(d_impl_p);
1068 const Name& elementName)
const
1070 return blpapi_SchemaTypeDefinition_getElementDefinition(
1071 d_impl_p, 0, elementName.impl())
1077 const char *nameString)
const
1079 return blpapi_SchemaTypeDefinition_getElementDefinition(
1080 d_impl_p, nameString, 0)
1086 const Name& elementName)
const
1088 blpapi_SchemaElementDefinition_t *def
1089 = blpapi_SchemaTypeDefinition_getElementDefinition(
1090 d_impl_p, 0, elementName.impl());
1098 const char *nameString)
const
1100 blpapi_SchemaElementDefinition_t *def
1101 = blpapi_SchemaTypeDefinition_getElementDefinition(
1102 d_impl_p, nameString, 0);
1112 blpapi_SchemaElementDefinition_t *def
1113 = blpapi_SchemaTypeDefinition_getElementDefinitionAt(
1123 return blpapi_SchemaTypeDefinition_isComplexType(d_impl_p) ? true :
false;
1128 return blpapi_SchemaTypeDefinition_isSimpleType(d_impl_p) ? true :
false;
1133 return blpapi_SchemaTypeDefinition_isEnumerationType(d_impl_p) ? true
1138 std::ostream& stream,
int level,
int spacesPerLevel)
const
1140 blpapi_SchemaTypeDefinition_print(d_impl_p,
1151 typeDef.
print(stream, 0, -1);
1157 blpapi_SchemaTypeDefinition_setUserData(d_impl_p, newUserData);
1162 return blpapi_SchemaTypeDefinition_userData(d_impl_p);
1167 return ConstantList(blpapi_SchemaTypeDefinition_enumeration(d_impl_p));
Provide a representation for schema-level enumeration constants.
Common definitions used by the library.
Defines Exceptions that can be thrown by the blpapi library.
Provide a representation of strings for use as container keys.
A signature for callback on print and default C++ implementation.
Definition blpapi_constant.h:626
static void throwOnError(int errorCode)
Definition blpapi_exception.h:556
Definition blpapi_name.h:228
Definition blpapi_schema.h:597
Name name() const
Definition blpapi_schema.h:948
~SchemaElementDefinition()
Definition blpapi_schema.h:946
Name getAlternateName(size_t index) const
Definition blpapi_schema.h:984
@ UNBOUNDED
Indicates an array has an unbounded number of values.
Definition blpapi_schema.h:607
std::ostream & print(std::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition blpapi_schema.h:994
void * userData() const
Definition blpapi_schema.h:1017
int status() const
Definition blpapi_schema.h:958
SchemaElementDefinition(blpapi_SchemaElementDefinition_t *handle)
Definition blpapi_schema.h:940
size_t numAlternateNames() const
Definition blpapi_schema.h:979
size_t maxValues() const
Definition blpapi_schema.h:974
const char * description() const
Definition blpapi_schema.h:953
size_t minValues() const
Definition blpapi_schema.h:969
void setUserData(void *userData)
Definition blpapi_schema.h:1012
const SchemaTypeDefinition typeDefinition() const
Definition blpapi_schema.h:964
Definition blpapi_schema.h:743
Name name() const
Definition blpapi_schema.h:1047
SchemaElementDefinition getElementDefinition(const Name &name) const
Definition blpapi_schema.h:1085
int datatype() const
Definition blpapi_schema.h:1042
bool hasElementDefinition(const Name &name) const
Definition blpapi_schema.h:1067
std::ostream & print(std::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition blpapi_schema.h:1137
void * userData() const
Definition blpapi_schema.h:1160
size_t numElementDefinitions() const
Definition blpapi_schema.h:1062
bool isComplexType() const
Definition blpapi_schema.h:1121
const ConstantList enumeration() const
Definition blpapi_schema.h:1165
int status() const
Definition blpapi_schema.h:1057
~SchemaTypeDefinition()
Definition blpapi_schema.h:1040
const char * description() const
Definition blpapi_schema.h:1052
bool isSimpleType() const
Definition blpapi_schema.h:1126
void setUserData(void *userData)
Definition blpapi_schema.h:1155
bool isEnumerationType() const
Definition blpapi_schema.h:1131
Definition blpapi_abstractsession.h:452
std::ostream & operator<<(std::ostream &os, const CorrelationId &correlator)
Definition blpapi_correlationid.h:761
Definition blpapi_abstractsession.h:451
Definition blpapi_schema.h:527
Value
Definition blpapi_schema.h:529
@ ACTIVE
This item is current and may appear in Messages.
Definition blpapi_schema.h:530
@ INACTIVE
This item is not current and will not appear in Messages.
Definition blpapi_schema.h:537
@ DEPRECATED
Definition blpapi_schema.h:533
@ PENDING_DEPRECATION
Definition blpapi_schema.h:540
static int writeToStream(const char *data, int length, void *stream)
Definition blpapi_streamproxy.h:108