36#ifndef INCLUDED_BLPAPI_SCHEMA
37#define INCLUDED_BLPAPI_SCHEMA
81#ifndef INCLUDED_BLPAPI_CONSTANT
85#ifndef INCLUDED_BLPAPI_DEFS
89#ifndef INCLUDED_BLPAPI_EXCEPTION
93#ifndef INCLUDED_BLPAPI_NAME
97#ifndef INCLUDED_BLPAPI_STREAMPROXY
101#ifndef INCLUDED_BLPAPI_TYPES
110typedef void *blpapi_SchemaTypeDefinition_t;
116blpapi_Name_t *blpapi_SchemaElementDefinition_name(
117 const blpapi_SchemaElementDefinition_t *field);
120const char *blpapi_SchemaElementDefinition_description(
121 const blpapi_SchemaElementDefinition_t *field);
124int blpapi_SchemaElementDefinition_status(
125 const blpapi_SchemaElementDefinition_t *field);
128blpapi_SchemaTypeDefinition_t *blpapi_SchemaElementDefinition_type(
129 const blpapi_SchemaElementDefinition_t *field);
132size_t blpapi_SchemaElementDefinition_numAlternateNames(
133 const blpapi_SchemaElementDefinition_t *field);
136blpapi_Name_t *blpapi_SchemaElementDefinition_getAlternateName(
137 const blpapi_SchemaElementDefinition_t *field,
size_t index);
145size_t blpapi_SchemaElementDefinition_minValues(
146 const blpapi_SchemaElementDefinition_t *field);
149size_t blpapi_SchemaElementDefinition_maxValues(
150 const blpapi_SchemaElementDefinition_t *field);
153int blpapi_SchemaElementDefinition_print(
154 const blpapi_SchemaElementDefinition_t *element,
155 blpapi_StreamWriter_t streamWriter,
161void blpapi_SchemaElementDefinition_setUserData(
162 blpapi_SchemaElementDefinition_t *field,
void *userdata);
165void *blpapi_SchemaElementDefinition_userData(
166 const blpapi_SchemaElementDefinition_t *field);
169blpapi_Name_t *blpapi_SchemaTypeDefinition_name(
170 const blpapi_SchemaTypeDefinition_t *type);
173const char *blpapi_SchemaTypeDefinition_description(
174 const blpapi_SchemaTypeDefinition_t *type);
177int blpapi_SchemaTypeDefinition_status(
178 const blpapi_SchemaTypeDefinition_t *type);
181int blpapi_SchemaTypeDefinition_datatype(
182 const blpapi_SchemaTypeDefinition_t *type);
185int blpapi_SchemaTypeDefinition_isComplexType(
186 const blpapi_SchemaTypeDefinition_t *type);
189int blpapi_SchemaTypeDefinition_isSimpleType(
190 const blpapi_SchemaTypeDefinition_t *type);
193int blpapi_SchemaTypeDefinition_isEnumerationType(
194 const blpapi_SchemaTypeDefinition_t *type);
197int blpapi_SchemaTypeDefinition_isComplex(
198 const blpapi_SchemaTypeDefinition_t *type);
201int blpapi_SchemaTypeDefinition_isSimple(
202 const blpapi_SchemaTypeDefinition_t *type);
205int blpapi_SchemaTypeDefinition_isEnumeration(
206 const blpapi_SchemaTypeDefinition_t *type);
209size_t blpapi_SchemaTypeDefinition_numElementDefinitions(
210 const blpapi_SchemaTypeDefinition_t *type);
213blpapi_SchemaElementDefinition_t *
214blpapi_SchemaTypeDefinition_getElementDefinition(
215 const blpapi_SchemaTypeDefinition_t *type,
216 const char *nameString,
217 const blpapi_Name_t *name);
220blpapi_SchemaElementDefinition_t *
221blpapi_SchemaTypeDefinition_getElementDefinitionAt(
222 const blpapi_SchemaTypeDefinition_t *type,
size_t index);
225int blpapi_SchemaTypeDefinition_print(
226 const blpapi_SchemaTypeDefinition_t *element,
227 blpapi_StreamWriter_t streamWriter,
233void blpapi_SchemaTypeDefinition_setUserData(
234 blpapi_SchemaTypeDefinition_t *element,
void *userdata);
237void *blpapi_SchemaTypeDefinition_userData(
238 const blpapi_SchemaTypeDefinition_t *element);
241blpapi_ConstantList_t *blpapi_SchemaTypeDefinition_enumeration(
242 const blpapi_SchemaTypeDefinition_t *element);
250#ifndef INCLUDED_IOSFWD
252#define INCLUDED_IOSFWD
291class SchemaTypeDefinition;
344 blpapi_SchemaElementDefinition_t *d_impl_p;
436 std::ostream& stream,
int level = 0,
int spacesPerLevel = 4)
const;
450 blpapi_SchemaElementDefinition_t *
impl()
const;
489 blpapi_SchemaTypeDefinition_t *d_impl_p;
625 std::ostream& stream,
int level = 0,
int spacesPerLevel = 4)
const;
682 blpapi_SchemaElementDefinition_t *handle)
691 return Name(blpapi_SchemaElementDefinition_name(d_impl_p));
696 return blpapi_SchemaElementDefinition_description(d_impl_p);
701 return blpapi_SchemaElementDefinition_status(d_impl_p);
712 return blpapi_SchemaElementDefinition_minValues(d_impl_p);
717 return blpapi_SchemaElementDefinition_maxValues(d_impl_p);
722 return blpapi_SchemaElementDefinition_numAlternateNames(d_impl_p);
727 blpapi_Name_t *alternateName
728 = blpapi_SchemaElementDefinition_getAlternateName(d_impl_p, index);
729 if (alternateName == 0) {
732 return Name(alternateName);
736 std::ostream& stream,
int level,
int spacesPerLevel)
const
738 blpapi_SchemaElementDefinition_print(d_impl_p,
749 element.
print(stream, 0, -1);
755 blpapi_SchemaElementDefinition_setUserData(d_impl_p, newUserData);
760 return blpapi_SchemaElementDefinition_userData(d_impl_p);
772inline SchemaTypeDefinition::SchemaTypeDefinition(
773 blpapi_SchemaTypeDefinition_t *handle)
783 return blpapi_SchemaTypeDefinition_datatype(d_impl_p);
788 return Name(blpapi_SchemaTypeDefinition_name(d_impl_p));
793 return blpapi_SchemaTypeDefinition_description(d_impl_p);
798 return blpapi_SchemaTypeDefinition_status(d_impl_p);
803 return blpapi_SchemaTypeDefinition_numElementDefinitions(d_impl_p);
807 const Name& elementName)
const
809 return blpapi_SchemaTypeDefinition_getElementDefinition(
810 d_impl_p, 0, elementName.
impl())
816 const char *nameString)
const
818 return blpapi_SchemaTypeDefinition_getElementDefinition(
819 d_impl_p, nameString, 0)
825 const Name& elementName)
const
827 blpapi_SchemaElementDefinition_t *def
828 = blpapi_SchemaTypeDefinition_getElementDefinition(
829 d_impl_p, 0, elementName.
impl());
837 const char *nameString)
const
839 blpapi_SchemaElementDefinition_t *def
840 = blpapi_SchemaTypeDefinition_getElementDefinition(
841 d_impl_p, nameString, 0);
851 blpapi_SchemaElementDefinition_t *def
852 = blpapi_SchemaTypeDefinition_getElementDefinitionAt(
862 return blpapi_SchemaTypeDefinition_isComplexType(d_impl_p) ? true :
false;
867 return blpapi_SchemaTypeDefinition_isSimpleType(d_impl_p) ? true :
false;
872 return blpapi_SchemaTypeDefinition_isEnumerationType(d_impl_p) ? true
877 std::ostream& stream,
int level,
int spacesPerLevel)
const
879 blpapi_SchemaTypeDefinition_print(d_impl_p,
890 typeDef.
print(stream, 0, -1);
896 blpapi_SchemaTypeDefinition_setUserData(d_impl_p, newUserData);
901 return blpapi_SchemaTypeDefinition_userData(d_impl_p);
906 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:412
static void throwOnError(int errorCode)
Definition blpapi_exception.h:541
Definition blpapi_name.h:242
blpapi_Name_t * impl() const
Definition blpapi_name.h:495
Definition blpapi_schema.h:342
Name name() const
Definition blpapi_schema.h:689
~SchemaElementDefinition()
Definition blpapi_schema.h:687
Name getAlternateName(size_t index) const
Definition blpapi_schema.h:725
std::ostream & print(std::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition blpapi_schema.h:735
void * userData() const
Definition blpapi_schema.h:758
blpapi_SchemaElementDefinition_t * impl() const
Definition blpapi_schema.h:763
int status() const
Definition blpapi_schema.h:699
@ UNBOUNDED
Indicates an array has an unbounded number of values.
Definition blpapi_schema.h:352
SchemaElementDefinition(blpapi_SchemaElementDefinition_t *handle)
Definition blpapi_schema.h:681
size_t numAlternateNames() const
Definition blpapi_schema.h:720
size_t maxValues() const
Definition blpapi_schema.h:715
const char * description() const
Definition blpapi_schema.h:694
size_t minValues() const
Definition blpapi_schema.h:710
void setUserData(void *userData)
Definition blpapi_schema.h:753
const SchemaTypeDefinition typeDefinition() const
Definition blpapi_schema.h:705
Definition blpapi_schema.h:486
Name name() const
Definition blpapi_schema.h:786
SchemaElementDefinition getElementDefinition(const Name &name) const
Definition blpapi_schema.h:824
int datatype() const
Definition blpapi_schema.h:781
bool hasElementDefinition(const Name &name) const
Definition blpapi_schema.h:806
std::ostream & print(std::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition blpapi_schema.h:876
void * userData() const
Definition blpapi_schema.h:899
size_t numElementDefinitions() const
Definition blpapi_schema.h:801
bool isComplexType() const
Definition blpapi_schema.h:860
const ConstantList enumeration() const
Definition blpapi_schema.h:904
int status() const
Definition blpapi_schema.h:796
~SchemaTypeDefinition()
Definition blpapi_schema.h:779
const char * description() const
Definition blpapi_schema.h:791
bool isSimpleType() const
Definition blpapi_schema.h:865
void setUserData(void *userData)
Definition blpapi_schema.h:894
bool isEnumerationType() const
Definition blpapi_schema.h:870
Definition blpapi_abstractsession.h:212
std::ostream & operator<<(std::ostream &os, const CorrelationId &correlator)
Definition blpapi_correlationid.h:680
Definition blpapi_abstractsession.h:211
Definition blpapi_schema.h:272
Value
Definition blpapi_schema.h:274
@ ACTIVE
This item is current and may appear in Messages.
Definition blpapi_schema.h:275
@ INACTIVE
This item is not current and will not appear in Messages.
Definition blpapi_schema.h:282
@ DEPRECATED
Definition blpapi_schema.h:278
@ PENDING_DEPRECATION
Definition blpapi_schema.h:285
static int writeToStream(const char *data, int length, void *stream)
Definition blpapi_streamproxy.h:109