ECObjects.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include <Bentley/Bentley.h>
11 #include <Bentley/RefCounted.h>
12 
13 // In many of the DgnPlatform libraries we redefine the below macros based on __cplusplus. This is because there
14 // are existing C callers that we can not get rid of. I've spoken to Sam and he recommends that for any new libraries we
15 // ONLY support cpp callers and therefore do not repeat this pattern.
16 
17 #ifdef __ECOBJECTS_BUILD__
18 #define ECOBJECTS_EXPORT EXPORT_ATTRIBUTE
19 #else
20 #define ECOBJECTS_EXPORT IMPORT_ATTRIBUTE
21 #endif
22 
23 #define BEGIN_BENTLEY_ECOBJECT_NAMESPACE BEGIN_BENTLEY_NAMESPACE namespace ECN {
24 
25 #define END_BENTLEY_ECOBJECT_NAMESPACE }}
26 
27 #define USING_NAMESPACE_EC using namespace Bentley::ECN;
28 
29 #define EC_TYPEDEFS(_name_) \
30  BEGIN_BENTLEY_ECOBJECT_NAMESPACE \
31  struct _name_; \
32  typedef _name_ * _name_##P; \
33  typedef _name_ & _name_##R; \
34  typedef _name_ const* _name_##CP; \
35  typedef _name_ const& _name_##CR; \
36  END_BENTLEY_ECOBJECT_NAMESPACE
37 
38 #define EC_REF_COUNTED_PTR(_name_) \
39  BEGIN_BENTLEY_ECOBJECT_NAMESPACE \
40  struct _name_ ; \
41  typedef RefCountedPtr<ECN:: _name_ > _name_ ## Ptr; \
42  END_BENTLEY_ECOBJECT_NAMESPACE \
43 
48 EC_TYPEDEFS(ECValueAccessorPair);
49 EC_TYPEDEFS(ECValueAccessorPairCollection);
50 EC_TYPEDEFS(ECValueAccessorPairCollectionOptions);
68 EC_TYPEDEFS(IECInstanceInterface);
76 EC_TYPEDEFS(ECRelationshipInstanceHolder);
77 
78 EC_TYPEDEFS(ECEnabler);
81 EC_TYPEDEFS(IArrayManipulator);
82 
89 
95 
96 EC_TYPEDEFS (CalculatedPropertySpecification);
97 EC_TYPEDEFS (ParserRegex);
98 EC_TYPEDEFS(IECTypeAdapterContext);
99 EC_TYPEDEFS(IECSchemaRemapper);
100 
102 EC_TYPEDEFS (UnitSpec);
103 EC_TYPEDEFS (Unit);
104 EC_TYPEDEFS (UnitConverter);
105 
106 
107 struct IStream;
108 
110 
113 
114 typedef struct IStream* IStreamP;
115 
117 typedef enum ECErrorCategories
118  {
126 
129  {
172  };
173 
176  {
184  };
185 
188  {
193  };
194 
197  {
210 
228  };
229 
232  {
240 
242  };
243 
246  {
253  };
254 
255 /*---------------------------------------------------------------------------------**/
262  {
270 
278 
288 
297  };
298 
299 
302 enum ValueKind ENUM_UNDERLYING_TYPE(unsigned short)
303  {
308  };
309 
310 
313 enum ArrayKind ENUM_UNDERLYING_TYPE(unsigned short)
314  {
317  };
318 
319 
323  {
337  };
338 
341  {
350 
351  // Returning ExprStatus_NotImpl in base methods is the lazy approach for methods that should be
352  // pure virtual. Should be eliminated after prototyping phase is done
354 
366  };
367 
370 
Returned when an instance method is called, but has not been defined.
Definition: ECObjects.h:359
The in-memory representation of the source and target constraints for an ECRelationshipClass as defin...
Definition: ECSchema.h:864
The ECValue has not be initialized yet.
Definition: ECObjects.h:304
Definition: ECObjects.h:315
Returned when the expression tries to perform a division operation on types that cannot be divided...
Definition: ECObjects.h:361
Definition: ECObjects.h:325
ECObjectsStatus
General purpose result codes.
Definition: ECObjects.h:128
The in-memory representation of an ECProperty as defined by ECSchemaXML.
Definition: ECSchema.h:468
Used to store the information from the SupplementalSchemaMetaData custom attribute.
Definition: SupplementalSchema.h:39
The ECValue holds an array.
Definition: ECObjects.h:307
Interface to find a standalone enabler, typically for an embedded ECStruct in an ECInstance.
Definition: ECSchema.h:1291
Definition: ECDBuffer.h:167
Returned when a struct is expected and not found.
Definition: ECObjects.h:346
ECN::IECRelationshipInstance is an instance of an ECRelationshipClass and represents the relationship...
Definition: ECInstance.h:568
Returned when an array is expected and not found.
Definition: ECObjects.h:347
The in-memory representation of a schema as defined by ECSchemaXML.
Definition: ECSchema.h:1375
An object that controls the lifetime of a set of ECSchemas.
Definition: ECSchema.h:1331
The ECValue holds a Primitive type.
Definition: ECObjects.h:305
Returned when a static method is called, but has not been defined.
Definition: ECObjects.h:360
Definition: ECObjects.h:333
Definition: ECObjects.h:324
Definition: ECObjects.h:332
Returned if a property name in the expression cannot be found in the containing class.
Definition: ECObjects.h:344
Definition: ECObjects.h:353
ValueKind
Represents the classification of the data type of an ECValue.
Definition: ECObjects.h:302
The ECValue holds a struct.
Definition: ECObjects.h:306
InstanceWriteStatus
Result status of writing an IECInstance to Xml.
Definition: ECObjects.h:231
Returned when the division operation tries to divide by zero.
Definition: ECObjects.h:362
Definition: ECObjects.h:336
A structure used for describing the complete location of an ECValue within an ECInstance.
Definition: ECValue.h:513
ECErrorCategories
Error code categories.
Definition: ECObjects.h:117
enum Bentley::ECN::ECErrorCategories ECErrorCategories
Error code categories.
Returned when the symbol type is of the wrong type for the expression.
Definition: ECObjects.h:356
ArrayKind
Represents the classification of the data type of an EC array element.
Definition: ECObjects.h:313
ExpressionStatus
Enumerates the possible return values for evaluating an expression or its value.
Definition: ECObjects.h:340
Definition: ECObjects.h:334
Legacy behavior.
Definition: ECObjects.h:269
Definition: ECObjects.h:171
The in-memory representation of a relationship class as defined by ECSchemaXML.
Definition: ECSchema.h:934
Fully defines a schema with its name, major and minor versions, and a checksum.
Definition: ECSchema.h:983
The in-memory representation of an ECProperty as defined by ECSchemaXML.
Definition: ECSchema.h:486
Interface implemented by class that provides schema location services.
Definition: ECSchema.h:1310
#define USING_NAMESPACE_BENTLEY
Definition: Bentley.h:133
Container holding ECProperties that supports STL like iteration.
Definition: ECSchema.h:515
Used to manage multiple custom struct serializers.
Definition: ECInstance.h:79
DateTimeInfo contains the meta data held by the custom attribute DateTimeInfo on an ECProperty of typ...
Definition: StandardCustomAttributeHelper.h:31
Definition: ECObjects.h:330
StandaloneECRelationshipInstance is used to represent a relationship between two IECInstances.
Definition: StandaloneECRelationshipInstance.h:85
SchemaReadStatus
Result status for deserializing an ECSchema from Xml.
Definition: ECObjects.h:175
ECN::StandaloneECInstance is an implementation of IECInstance which is not tied to a specified persis...
Definition: StandaloneECInstance.h:87
Returned when expression uses incompatible types (ie, trying to perform arithmetic on two strings) ...
Definition: ECObjects.h:357
PrimitiveType
Enumeration of primitive datatypes supported by native "ECObjects" implementation.
Definition: ECObjects.h:322
#define END_BENTLEY_ECOBJECT_NAMESPACE
Definition: ECObjects.h:25
SchemaWriteStatus
Result status for serializing an ECSchema to Xml.
Definition: ECObjects.h:187
Arithmetic, comparison, and assignment operations will check the units of their operands and: ...
Definition: ECObjects.h:287
Returned when units are combined in an unsupported manner within the expression, for example adding a...
Definition: ECObjects.h:365
Definition: ECObjects.h:349
Returned when the number of arguments to a method in an expression do not match the number of argumen...
Definition: ECObjects.h:363
Definition: ECObjects.h:121
A collection of all ECPropertyValues contained in an IECInstance or an ECPropertyValue.
Definition: ECValue.h:720
Returned when the symbol needs to be an lvalue.
Definition: ECObjects.h:355
Context object used for schema creation and deserialization.
Definition: ECContext.h:22
Returned when a method token is expected and not found.
Definition: ECObjects.h:358
IECTypeAdapter::_ConvertTo/FromExpressionType() will not be invoked for property values used in the E...
Definition: ECObjects.h:277
Definition: ECDBuffer.h:81
ECN::MemoryECInstanceBase is base class for ECInstances that holds its values in memory that it alloc...
Definition: StandaloneECInstance.h:52
Returned when array index is used which is outside the bounds of the array.
Definition: ECObjects.h:364
EvaluationOptions
Options to be used when evaluating an ECExpression.
Definition: ECObjects.h:261
Interface for a custom ECStruct Serializer.
Definition: ECInstance.h:53
Defines typedefs and constants that can be used across other namespaces. All Bentley-authored C++ sou...
Context object used for instance creation and deserialization.
Definition: ECContext.h:89
Definition: ECObjects.h:331
SupplementedSchemaStatus
Result status of trying to supplement an ECSchema.
Definition: ECObjects.h:245
typical usage for (ECInstanceIterable::const_iterator iter = collection.begin(); iter != collection...
Definition: ECInstanceIterable.h:63
The in-memory representation of an ECProperty as defined by ECSchemaXML.
Definition: ECSchema.h:451
Variant-like object used to set and retrieve property values in ECInstances.
Definition: ECValue.h:73
Definition: ECObjects.h:335
Definition: ECObjects.h:119
Relates an ECProperty with an ECValue.
Definition: ECValue.h:666
Definition: ECDBuffer.h:37
Success.
Definition: ECObjects.h:342
InstanceReadStatus
Result status of deserializing an IECInstance from Xml.
Definition: ECObjects.h:196
#define BEGIN_BENTLEY_ECOBJECT_NAMESPACE
Definition: ECObjects.h:23
Definition: ECObjects.h:177
This class describes the cardinality of a relationship.
Definition: ECSchema.h:811
Definition: ECObjects.h:120
Definition: ECObjects.h:316
There as an unknown error in evaluation.
Definition: ECObjects.h:343
Base class for ECN::IECInstance implementations that get/set values from a block of memory...
Definition: ECDBuffer.h:230
Definition: Bentley.h:210
Information about an array in an ECN::IECInstance.
Definition: ECValue.h:30
Definition: ECObjects.h:123
#define EC_TYPEDEFS(_name_)
Definition: ECObjects.h:29
Definition: ECObjects.h:130
Interface adopted by a container object which can hold custom attributes, such as those associated wi...
Definition: ECSchema.h:145
Definition: ECObjects.h:122
Definition: ECSchema.h:1098
Returned when the symbol in the expression cannot be resolved.
Definition: ECObjects.h:348
#define EC_REF_COUNTED_PTR(_name_)
Definition: ECObjects.h:38
An IECInstance represents an instance of an ECClass.
Definition: ECInstance.h:115
ECEnabler for standalone ECInstances (IECInstances not tied to a specific persistent store) ...
Definition: StandaloneECInstance.h:103
Returned when a primitive is expected and not found.
Definition: ECObjects.h:345
struct IStream * IStreamP
Definition: ECObjects.h:114
The in-memory representation of an ECClass as defined by ECSchemaXML.
Definition: ECSchema.h:576
The in-memory representation of an ECProperty as defined by ECSchemaXML.
Definition: ECSchema.h:377
Additional date time metadata can be specified on an ECProperty of this type via the custom attribute...
Definition: ECObjects.h:329
#define ENUM_UNDERLYING_TYPE(T)
Definition: Bentley.h:70
Helper object used to apply metadata to ECSchemas, ECClasses, and ECProperties used to control how th...
Definition: PresentationMetadataHelper.h:51
IECTypeAdapter::_ConvertTo/FromExpressionType() will be invoked only for property values used in the ...
Definition: ECObjects.h:296
Supports STL like iterator of classes in a schema.
Definition: ECSchema.h:1246

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.