ParametricModeling.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\RefCounted.h>
11 #include <DgnPlatform\DgnCore.h>
13 #include <DgnPlatform\ValueParse.h>
14 #include <Bentley\BeTextFile.h>
16 
17 
18 DGNPLATFORM_TYPEDEFS (IParameterValues);
19 DGNPLATFORM_TYPEDEFS (ParameterValue);
20 DGNPLATFORM_TYPEDEFS (ParameterDefinition);
21 DGNPLATFORM_TYPEDEFS (IParameterDefinitions);
22 DGNPLATFORM_TYPEDEFS (IEditParameterDefinitions);
23 DGNPLATFORM_TYPEDEFS (IParameterDefinitionsIterator);
24 DGNPLATFORM_TYPEDEFS (IParameterSet);
25 DGNPLATFORM_TYPEDEFS (IParameterSetCollection);
26 DGNPLATFORM_TYPEDEFS (IParameterSetIterator);
27 DGNPLATFORM_TYPEDEFS (IActiveParameters);
28 DGNPLATFORM_TYPEDEFS (PropertyBindingSpec);
29 DGNPLATFORM_TYPEDEFS(ParameterCsvReadContext);
30 DGNPLATFORM_TYPEDEFS(ParameterCsvSectionPresenceFlags);
31 
32 DGNPLATFORM_TYPEDEFS(IParameterExpression);
33 DGNPLATFORM_TYPEDEFS(IParameterExpressionContext);
34 DGNPLATFORM_TYPEDEFS(IParseParameterExpressionContext);
35 DGNPLATFORM_TYPEDEFS(IEvaluateParameterExpressionContext);
36 DGNPLATFORM_TYPEDEFS(ParseParameterExpressionResult);
37 DGNPLATFORM_TYPEDEFS(IParameterExpressionHandler);
38 
39 DGNPLATFORM_REF_COUNTED_PTR (IParameterSet);
40 DGNPLATFORM_REF_COUNTED_PTR (IParameterSetCollection);
41 DGNPLATFORM_REF_COUNTED_PTR (IParameterDefinitions);
42 DGNPLATFORM_REF_COUNTED_PTR (IEditParameterDefinitions);
43 DGNPLATFORM_REF_COUNTED_PTR (IParameterDefinitionsIterator);
44 DGNPLATFORM_REF_COUNTED_PTR (IActiveParameters);
45 DGNPLATFORM_REF_COUNTED_PTR (IParameterExpressionContext);
46 DGNPLATFORM_REF_COUNTED_PTR (IParseParameterExpressionContext);
47 DGNPLATFORM_REF_COUNTED_PTR (IEvaluateParameterExpressionContext);
48 
49 DGNPLATFORM_REF_COUNTED_PTR (IParameterExpression);
50 
52 
77 
78 /*---------------------------------------------------------------------------------**/
82 enum class ParameterStatus
83  {
84  Success = SUCCESS,
85 
86  DuplicateName = 1,
87  InvalidName,
95  ReadOnly,
97 
98  Error = ERROR,
99  };
100 
101 /*---------------------------------------------------------------------------------**/
105 enum class ParameterType
106  {
107  Custom = 0,
108  Distance,
109  Angle,
110  Scalar,
111  Integer,
112  Boolean,
113  Area,
114  String,
115 
116  Unknown = 0xFF
117  };
118 
119 /*---------------------------------------------------------------------------------**/
128  {
129 private:
130  friend struct IParameterValues;
131 
132  ParameterType m_type;
133  ECN::ECValue m_ecvalue;
134 public:
136 
137  ECN::ECValueCR GetECValue() const { return m_ecvalue; }
138  ParameterType GetType() const { return m_type; }
139  bool IsNull() const { return m_ecvalue.IsNull(); }
140 
141  DGNPLATFORM_EXPORT bool SetDistance (double distance);
142  DGNPLATFORM_EXPORT bool SetArea (double area);
143  DGNPLATFORM_EXPORT bool SetAngle (double angle);
144  DGNPLATFORM_EXPORT void SetScalar (double value);
145  DGNPLATFORM_EXPORT void SetInteger (Int32 value);
146  DGNPLATFORM_EXPORT void SetBoolean (bool value);
147  DGNPLATFORM_EXPORT void SetString (WCharCP value);
148  DGNPLATFORM_EXPORT void SetCustom (ECN::ECValueCR value);
149  bool SetNumeric (double value, ParameterType type);
150  DGNPLATFORM_EXPORT void Clear();
151  DGNPLATFORM_EXPORT bool ConvertTo (ParameterType newType, DgnModelR model);
152 
153  DGNPLATFORM_EXPORT static ParameterValue MakeBoolean (bool value);
154  DGNPLATFORM_EXPORT static ParameterValue MakeInteger (Int32 value);
155  DGNPLATFORM_EXPORT static ParameterValue MakeScalar (double value);
156  DGNPLATFORM_EXPORT static ParameterValue MakeDistance (double valueInMeters);
157  DGNPLATFORM_EXPORT static ParameterValue MakeArea (double valueInSquareMeters);
158  DGNPLATFORM_EXPORT static ParameterValue MakeAngle (double valueInDegrees);
159  DGNPLATFORM_EXPORT static ParameterValue MakeString (WCharCP value);
160 
161  ECN::UnitSpec GetUnits() const;
162  };
163 
164 /*---------------------------------------------------------------------------------**/
168 enum class ParameterUnits : UInt8
169  {
170  Storage = 0,
171  Invariant = 1,
172  Model = 2,
173  };
174 
175 /*---------------------------------------------------------------------------------**/
183  {
184 private:
185  virtual void MakeClassAbstract() = 0;
186 public:
187  DGNPLATFORM_EXPORT ECN::IECInstanceR GetProperties();
188 public:
190  DGNPLATFORM_EXPORT DgnModelR GetHostModel() const;
192  DGNPLATFORM_EXPORT ECN::ECObjectsStatus GetValue (ECN::ECValueR v, WCharCP accessString, ParameterUnits units = ParameterUnits::Storage) const;
194  DGNPLATFORM_EXPORT ECN::IECInstanceCR GetProperties() const;
196  DGNPLATFORM_EXPORT bool IsReadOnly() const;
198  DGNPLATFORM_EXPORT ECN::ECObjectsStatus SetValue (WCharCP accessString, ECN::ECValueCR value, ParameterUnits units = ParameterUnits::Storage);
200  DGNPLATFORM_EXPORT ParameterStatus WriteValues();
201  };
202 
203 
204 /*---------------------------------------------------------------------------------**/
214  {
215 private:
216  virtual void MakeClassAbstract() = 0;
217 public:
218 public:
220  DGNPLATFORM_EXPORT WString GetName() const;
222  DGNPLATFORM_EXPORT WString GetDescription() const;
224  DGNPLATFORM_EXPORT bool SetName (WCharCP name);
226  DGNPLATFORM_EXPORT bool SetDescription (WCharCP desc);
228  DGNPLATFORM_EXPORT Int32 GetSortOrder() const;
230  DGNPLATFORM_EXPORT bool SetSortOrder (Int32 priority);
231  };
232 
233 /*---------------------------------------------------------------------------------**/
237 struct IParameterSetIterator : RefCountedBase, std::iterator<std::forward_iterator_tag, IParameterSetPtr const>
238  {
239 public:
241  virtual bool IsDifferent (IParameterSetIteratorCR rhs) const = 0;
243  virtual void MoveToNext() = 0;
245  virtual IParameterSetPtr const& GetCurrent() const = 0;
246  };
247 
248 /*---------------------------------------------------------------------------------**/
254  {
256 private:
257  virtual void MakeClassAbstract() = 0;
258 public:
259 public:
264 
266  DGNPLATFORM_EXPORT IParameterSetPtr FindByName (WCharCP name) const;
267  };
268 
269 /*---------------------------------------------------------------------------------**/
281  {
282 protected:
283 
284  enum Flags
285  {
286  kFlag_None = 0,
287  kFlag_DefinitionScope = 1 << 0,
288  kFlag_Hidden = 1 << 1,
289  kFlag_DomainParameter = 1 << 2,
290  kFlag_Calculated = 1 << 3,
291  };
292 
297 
298  bool GetFlag (Flags flag) const { return flag == (m_flags & flag); }
299  void SetFlag (Flags flag, bool on) { m_flags = static_cast<Flags> (on ? (m_flags | flag) : (m_flags & (~flag))); }
300 public:
304  DGNPLATFORM_EXPORT ParameterDefinition (ParameterDefinitionCR other);
305 
307  WCharCP GetDisplayLabel() const { return m_displayLabel.c_str(); }
309  WCharCP GetAccessString() const { return m_accessString.c_str(); }
311  ParameterType GetType() const { return m_type; }
312 
314  bool IsDefinitionScope() const { return GetFlag (kFlag_DefinitionScope); }
316  bool IsHidden() const { return GetFlag (kFlag_Hidden); }
318  bool IsDomainParameter() const { return GetFlag (kFlag_DomainParameter); }
320  bool IsCalculated() const { return GetFlag (kFlag_Calculated); }
321 
323  void SetDisplayLabel (WCharCP label) { m_displayLabel = label; }
325  void SetIsHidden (bool hidden) { SetFlag (kFlag_Hidden, hidden); }
327  void SetDefinitionScope (bool isDefinitionScope) { SetFlag (kFlag_DefinitionScope, isDefinitionScope); }
330  };
331 
332 /*---------------------------------------------------------------------------------**/
339 struct IParameterDefinitionsIterator : RefCountedBase, std::iterator<std::forward_iterator_tag, ParameterDefinition const>
340  {
342  virtual bool IsDifferent (IParameterDefinitionsIteratorCR rhs) const = 0;
344  virtual void MoveToNext() = 0;
346  virtual ParameterDefinitionCR GetCurrent() const = 0;
347  };
348 
349 /*---------------------------------------------------------------------------------**/
359  {
360 private:
361  virtual void MakeClassAbstract() = 0;
362 public:
363 public:
365  DGNPLATFORM_EXPORT ElementHandle GetDependencyRoot() const;
367  DGNPLATFORM_EXPORT ParameterStatus ApplyParameters (IParameterValuesCR values);
368  };
370 
495 /*---------------------------------------------------------------------------------**/
501  {
502  Success = SUCCESS,
503 
508  NullValue,
511  UnknownSymbol,
517 
518  Error = ERROR
519  };
520 
521 /*---------------------------------------------------------------------------------**/
527  {
528 public:
529  /*---------------------------------------------------------------------------------**/
535  struct Detail
536  {
538  protected:
540  size_t m_inputPos;
541  public:
543  void Init() { m_status = ParameterExpressionStatus::Error; m_inputPos = WString::npos; }
545  ParameterExpressionStatus GetStatus() const { return m_status; }
547  size_t GetInputPos() const { return m_inputPos; }
548  };
549 
550  /*---------------------------------------------------------------------------------**/
555  {
556  protected:
558  bool m_numeric;
559  public:
560  void Init (ParameterType expected, bool numeric, size_t inputPos)
561  {
562  m_status = ParameterExpressionStatus::IncompatibleType;
563  m_inputPos = inputPos;
564  m_expected = expected;
565  m_numeric = numeric;
566  }
567 
569  ParameterType GetExpectedType() const { return m_expected; }
571  bool GetExpectedNumeric() const { return m_numeric; }
572  };
573 
574  /*---------------------------------------------------------------------------------**/
579  {
580  protected:
583  public:
584  void Init (WCharCP open, WCharCP close, size_t inputPos)
585  {
586  m_status = ParameterExpressionStatus::MismatchedDelimiters;
587  m_inputPos = inputPos;
588  m_open = open;
589  m_close = close;
590  }
591 
593  WCharCP GetOpeningDelimiter() const { return m_open; }
595  WCharCP GetClosingDelimiter() const { return m_close; }
596  };
597 
598  /*---------------------------------------------------------------------------------**/
603  {
604  protected:
605  enum { kMaxSize = 0x100 };
606 
607  WChar m_symbol[kMaxSize];
608  public:
609  void Init (WCharCP symbol, size_t inputPos);
610 
612  WCharCP GetSymbolName() const { return m_symbol; }
613  };
614 private:
615  IParameterExpressionPtr m_expression;
616  union
617  {
622  } m_detail;
623 public:
625  IParameterExpressionP GetParsedExpression() { return m_expression.get(); }
627  IParameterExpressionCP GetParsedExpression() const { return m_expression.get(); }
628  };
629 /*---------------------------------------------------------------------------------**/
636  {
637 private:
638  virtual void MakeClassAbstract() = 0;
639 public:
640 public:
642  DGNPLATFORM_EXPORT IParameterDefinitionsCR GetParameterDefinitions() const;
643  DGNPLATFORM_EXPORT DgnModelR GetHostModel() const;
644 
645  DGNPLATFORM_EXPORT static IParameterExpressionContextPtr Create (IParameterDefinitionsCR defs);
646  };
647 /*---------------------------------------------------------------------------------**/
654  {
655 private:
656  virtual void MakeClassAbstract() = 0;
657 public:
658 public:
660  DGNPLATFORM_EXPORT ParameterType GetResultType() const;
662  DGNPLATFORM_EXPORT WCharCP GetTargetAccessString() const;
663 
665  DistanceParserPtr CreateDistanceParser() const;
667  AngleParserPtr CreateAngleParser() const;
669  AreaParserPtr CreateAreaParser() const;
670 
671  DGNPLATFORM_EXPORT static IParseParameterExpressionContextPtr Create (IParameterDefinitionsCR defs, ParameterType resultType, WCharCP targetAccessString = nullptr);
672  };
673 
674 /*---------------------------------------------------------------------------------**/
681  {
682 protected:
683 private:
684  virtual void MakeClassAbstract() = 0;
685 public:
686 public:
688  DGNPLATFORM_EXPORT IParameterValuesCR GetParameterValues() const;
689 
690  DGNPLATFORM_EXPORT static IEvaluateParameterExpressionContextPtr Create (IParameterDefinitionsCR defs, IParameterValuesCR values);
691  };
692 
693 /*---------------------------------------------------------------------------------**/
699  {
700 private:
701  virtual void MakeClassAbstract() = 0;
702 public:
707  DGNPLATFORM_EXPORT ParameterExpressionStatus Evaluate (ParameterValueR pv, IEvaluateParameterExpressionContextCR context) const;
708  };
709 
710 /*---------------------------------------------------------------------------------**/
715  {
716  ParameterExpressionHandlerId() : HandlerId (INVALID_ID, 0) { }
718  };
719 
720 /*---------------------------------------------------------------------------------**/
726  {
727 private:
728  virtual void MakeClassAbstract() = 0;
729 public:
730 public:
735  DGNPLATFORM_EXPORT ParseParameterExpressionResult Parse (WCharCP input, IParseParameterExpressionContextCR context) const;
736  };
738 
741 /*---------------------------------------------------------------------------------**/
747  {
748  ItemType = 0,
749  LocalVariables = 1,
750  Expressions = 2,
751  ActiveValues = 3,
752  Variations = 4,
753  WorkingUnits = 5,
754  Visibility = 6,
755  Scope = 7,
756  };
757 
758 /*---------------------------------------------------------------------------------**/
765  {
766 private:
767  uint32_t m_mask;
768 public:
774  DGNPLATFORM_EXPORT ParameterCsvSectionPresenceFlags(ParameterCsvSectionPresenceFlagsCR rData) {m_mask = rData.m_mask;}
776  DGNPLATFORM_EXPORT ParameterCsvSectionPresenceFlagsR operator = (ParameterCsvSectionPresenceFlagsCR rData) {m_mask = rData.m_mask; return *this;}
777 
780  {
781  auto mask = 1 << static_cast<uint8_t>(section);
782  m_mask = present ? (m_mask | mask) : (m_mask & ~mask);
783  }
784 
786  DGNPLATFORM_EXPORT bool IsEmpty() const { return 0 == m_mask; }
788  DGNPLATFORM_EXPORT void ClearAll() { m_mask = 0; }
790  DGNPLATFORM_EXPORT void SetAll();
791  };
792 
793 /*---------------------------------------------------------------------------------**/
801  {
802 private:
804 
805 public:
808  DGNPLATFORM_EXPORT ParameterCsvReadContext (ParameterCsvSectionPresenceFlagsCR presenceFlags) : m_flags (presenceFlags) { }
812  DGNPLATFORM_EXPORT ParameterCsvReadContext (ParameterCsvReadContextCR rData) { m_flags = rData.m_flags; }
815  };
816 
817 /*---------------------------------------------------------------------------------**/
829  {
831 private:
832  virtual void MakeClassAbstract() = 0;
833 public:
834 public:
840  DGNPLATFORM_EXPORT IEditParameterDefinitionsP GetForEdit();
842  DGNPLATFORM_EXPORT ECN::ECClassCP GetDomainClass() const;
843 
845  DGNPLATFORM_EXPORT UInt32 GetLocalParameterCount() const;
847  DGNPLATFORM_EXPORT Int32 GetParameterSortOrder (WCharCP accessString) const;
848 
850  DGNPLATFORM_EXPORT ParameterStatus FindByAccessString (ParameterDefinitionR def, WCharCP accessString) const;
852  DGNPLATFORM_EXPORT ParameterStatus FindByLabel (ParameterDefinitionR def, WCharCP label) const;
853 
855  DGNPLATFORM_EXPORT static IParameterDefinitionsPtr GetForModel (DgnModelR model);
856 
858  DGNPLATFORM_EXPORT bool IsParameterReferenced (WCharCP accessString) const;
859 
861  DGNPLATFORM_EXPORT IParameterExpressionHandlerCR GetExpressionHandler() const;
870  DGNPLATFORM_EXPORT ParameterExpressionStatus EvaluateExpressions (IParameterValuesR values) const;
871  };
872 
873 /*---------------------------------------------------------------------------------**/
880  {
881 private:
882  virtual void MakeClassAbstract() = 0;
883 public:
884 public:
893  DGNPLATFORM_EXPORT ParameterStatus Add (WCharCP label, ParameterType type, double value, bool hidden = false);
899  DGNPLATFORM_EXPORT ParameterStatus Add (WCharCP label, Int32 value, bool hidden = false);
905  DGNPLATFORM_EXPORT ParameterStatus Add(WCharCP label, bool value, bool hidden = false);
911  DGNPLATFORM_EXPORT ParameterStatus Add(WCharCP label, WCharCP value, bool hidden = false);
920  DGNPLATFORM_EXPORT ParameterStatus Replace (ParameterDefinitionCR def);
930  DGNPLATFORM_EXPORT ParameterStatus SetDomainParameters (ECN::IECInstanceCP domainParams);
937  DGNPLATFORM_EXPORT ParameterStatus SetExpressionForParameter (WCharCP accessString, IParameterExpressionCP expr);
943  DGNPLATFORM_EXPORT ParameterCsvSectionPresenceFlags ReadFromCsv (CsvFileR src, ParameterCsvReadContextCR context);
944  };
945 
946 /*---------------------------------------------------------------------------------**/
960  {
961 private:
962  WString m_externalizedInstanceId;
963  WString m_accessString;
964  UInt16 m_providerId;
965 public:
970 
972  bool IsValid() const { return DgnECProviderId_Invalid != m_providerId; }
974  WCharCP GetAccessString() const { return m_accessString.c_str(); }
976  DGNPLATFORM_EXPORT bool Schedule (EditElementHandleR eeh, WCharCP parameterAccessString) const;
978  DGNPLATFORM_EXPORT bool ScheduleRemoval (EditElementHandleR eeh) const;
980  DGNPLATFORM_EXPORT bool GetControllingParameterAccessString (WStringR accessString, ElementHandleCR eh) const;
982  DGNPLATFORM_EXPORT bool HasControllingParameter (ElementHandleCR eh) const;
983  };
984 
987 
Provides iteration over the parameter sets in an IParameterSetCollection.
Definition: ParametricModeling.h:237
An element was added to the file.
ECObjectsStatus
General purpose result codes.
Definition: ECObjects.h:128
size_t GetInputPos() const
Returns the position in the input string at which a parse error, if any occurred, if the position cou...
Definition: ParametricModeling.h:547
Distance dimensional constraint.
A readonly "handle" to an element.
Definition: ElementHandle.h:113
IParameterExpressionCP GetParsedExpression() const
Returns the object representing the parsed expression, if parsing was successful. ...
Definition: ParametricModeling.h:627
Definition: Bentley.h:212
DGNPLATFORM_EXPORT ParameterCsvReadContext(ParameterCsvReadContextCR rData)
Constructor Constructor.
Definition: ParametricModeling.h:812
Flags m_flags
Definition: ParametricModeling.h:296
Provides iteration over the parameter definitions within an IParameterDefinitions collection...
Definition: ParametricModeling.h:339
#define END_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:69
Defines a named collection of CustomProperties which can be attached to elements, models...
Definition: CustomItemType.h:304
WCharCP GetAccessString() const
Returns the access string of the bound property.
Definition: ParametricModeling.h:974
Attempting to create a parametric cell which contains an instance of a parametric cell with the same ...
void SetDefinitionScope(bool isDefinitionScope)
Sets whether this parameter's value is not allowed to be overridden when the parametric model is plac...
Definition: ParametricModeling.h:327
bool IsNull() const
Definition: ParametricModeling.h:139
void SetFlag(Flags flag, bool on)
Definition: ParametricModeling.h:299
wchar_t WChar
Definition: Bentley.h:223
A bitfield-like structure which defines which sections are included in CSV representing a model's par...
Definition: ParametricModeling.h:764
ParameterExpressionHandlerId()
Definition: ParametricModeling.h:716
signed 32-bit integer, unitless
Provides all of the query functionality of IParameterDefinitions, as well as methods for modifying th...
Definition: ParametricModeling.h:879
virtual DGNPLATFORM_EXPORT ~ParameterCsvReadContext()
Destructor.
Definition: ParametricModeling.h:814
ParameterType m_type
Definition: ParametricModeling.h:295
IECInstance const * IECInstanceCP
Definition: ECObjects.h:67
Interface adopted by an object which can parse and deserialize parameter expressions.
Definition: ParametricModeling.h:725
ParameterExpressionStatus m_status
Definition: ParametricModeling.h:539
bool GetExpectedNumeric() const
Returns true if the expression was expected to resolve to any of the numeric types.
Definition: ParametricModeling.h:571
bool GetFlag(Flags flag) const
Definition: ParametricModeling.h:298
A named set of parameter values, representing a "variation" on a parametric model.
Definition: ParametricModeling.h:213
IParameterExpressionP GetParsedExpression()
Returns the object representing the parsed expression, if parsing was successful. ...
Definition: ParametricModeling.h:625
DGNPLATFORM_EXPORT bool IsEmpty() const
Returns true if no sections are marked as present.
Definition: ParametricModeling.h:786
iterator begin()
Definition: stdcxx/bstdmap.h:178
ParameterExpressionStatus
Possible return values from methods which manipulate parameter expressions.
Definition: ParametricModeling.h:500
ParameterValue holds the value of a single parameter, in invariant units: Distance => in meters Angle...
Definition: ParametricModeling.h:127
void Init()
Default-initializes to an unspecified error state.
Definition: ParametricModeling.h:543
Detail m_base
Definition: ParametricModeling.h:618
ParameterType
The set of types which are considered meaningful for parametric modeling.
Definition: ParametricModeling.h:105
uint16_t UInt16
Definition: Bentley.r.h:118
MismatchedDelimitersDetail m_mismatchedDelimiters
Definition: ParametricModeling.h:620
WCharCP GetClosingDelimiter() const
Returns the expected closing delimiter.
Definition: ParametricModeling.h:595
The result of an expression could not be assigned to the associated parameter.
DGNPLATFORM_EXPORT ParameterCsvSectionPresenceFlags(ParameterCsvSectionPresenceFlagsCR rData)
Copy-constructor.
Definition: ParametricModeling.h:774
iterator end()
Definition: stdcxx/bstdmap.h:186
ParameterStatus
Return status codes for Parametric Modeling-related functions.
Definition: ParametricModeling.h:82
A writeable "handle" to an MSElement.
Definition: ElementHandle.h:470
Area dimensional constraint.
uint8_t UInt8
Definition: Bentley.r.h:116
Defines the metadata describing a parameter.
Definition: ParametricModeling.h:280
#define DGNPLATFORM_EXPORT
Definition: DgnPlatform/ExportMacros.h:58
ECValue const & ECValueCR
Definition: ECObjects.h:46
DGNPLATFORM_REF_COUNTED_PTR(IParameterSet)
wchar_t const * WCharCP
Definition: Bentley.h:224
An operation involved a parameter with units not supported by that operation.
bool IsDomainParameter() const
If true, this parameter originates from a pre-defined ECClass supplied by the creator of the componen...
Definition: ParametricModeling.h:318
ParameterCsvSection
Identifies a section of a .csv file containing exported parametric model settings.
Definition: ParametricModeling.h:746
Defines the dependent end of a property binding.
Definition: ParametricModeling.h:959
This section contains the active values of each parameter.
uint32_t UInt32
Definition: Bentley.r.h:128
bstdmap & operator=(const bstdmap &__rhs)
Definition: stdcxx/bstdmap.h:170
WCharCP GetDisplayLabel() const
Returns the user-visible parameter name.
Definition: ParametricModeling.h:307
Distances: meters. Angles: degrees. Areas: square meters.
Provides details about a parse attempt which resulted in IncompatibleType status. ...
Definition: ParametricModeling.h:554
ParameterType GetType() const
Returns the parameter type.
Definition: ParametricModeling.h:311
bool IsCalculated() const
If true, this parameter's value is calculated using an expression, and otherwise treated as read-only...
Definition: ParametricModeling.h:320
size_t m_inputPos
Definition: ParametricModeling.h:540
Name rejected because it is not unique.
void Init(ParameterType expected, bool numeric, size_t inputPos)
Definition: ParametricModeling.h:560
A DgnModel represents a DgnModel in memory.
Definition: DgnModel.h:236
This section contains a conversion factor for the working units of the model.
ECN::ECValueCR GetECValue() const
Definition: ParametricModeling.h:137
Provides a context in which the contents of a .csv file containing parametric model settings can be r...
Definition: ParametricModeling.h:800
void Init(WCharCP open, WCharCP close, size_t inputPos)
Definition: ParametricModeling.h:584
Name rejected because it is not valid.
WString m_displayLabel
Definition: ParametricModeling.h:293
int32_t Int32
Definition: Bentley.r.h:119
Interface adopted by an object which can serve as the context for operations involving parsing or eva...
Definition: ParametricModeling.h:635
A shared pointer template for reference-counted objects.
Definition: RefCounted.h:119
Holds the result of an attempt to parse a parameter expression string.
Definition: ParametricModeling.h:526
ECClass const * ECClassCP
Definition: ECObjects.h:63
This section contains a row for each expression associated to a parameter.
ParameterUnits
Identifies the class of units in which the value of a parameter is specified.
Definition: ParametricModeling.h:168
IECInstance const & IECInstanceCR
Definition: ECObjects.h:67
Base class to make a class non-copyable.
Definition: NonCopyableClass.h:23
An operation involved a parameter of a type not supported by that operation.
Interface adopted by an object which serves as the context for evaluating parameter expressions...
Definition: ParametricModeling.h:680
Variant-like object used to set and retrieve property values in ECInstances.
Definition: ECValue.h:73
DGNPLATFORM_EXPORT ParameterCsvReadContext(ParameterCsvSectionPresenceFlagsCR presenceFlags)
Constructor.
Definition: ParametricModeling.h:808
DGNPLATFORM_TYPEDEFS(IParameterValues)
VirtualCollectionIterator< IParameterDefinitionsIterator > const_iterator
Definition: ParametricModeling.h:830
This section contains a row for each IParameterSet defined in the model.
Flags
Definition: ParametricModeling.h:284
Angle dimensional constraint which allows it to have any value between 0 and 2pi radians.
DGNPLATFORM_EXPORT ParameterCsvSectionPresenceFlags()
Constructs an empty state (no sections present)
Definition: ParametricModeling.h:770
A literal value such as a number could not be parsed.
#define BEGIN_BENTLEY_DGNPLATFORM_NAMESPACE
Definition: DgnPlatformBaseType.r.h:68
This template is used by iterators that hide their implementation from the published API...
Definition: VirtualCollectionIterator.h:33
This section contains he name of the Item Type associated to the model's parameters.
Provides details about a parse attempt which resulted in MismatchedDelimiters status.
Definition: ParametricModeling.h:578
ParameterExpressionHandlerId(UInt16 id)
Definition: ParametricModeling.h:717
Provides details about a parse attempt which resulted in UnknownSymbol status.
Definition: ParametricModeling.h:602
Holds the "active" values of the parameters within a parametric model.
Definition: ParametricModeling.h:358
ParameterType GetExpectedType() const
Returns the type to which the expression was expected to resolve.
Definition: ParametricModeling.h:569
void SetIsHidden(bool hidden)
Sets whether this parameter will be hidden when the parametric model is placed as a cell...
Definition: ParametricModeling.h:325
DGNPLATFORM_EXPORT ParameterCsvSectionPresenceFlags(uint32_t mask)
Constructs from an integer mask.
Definition: ParametricModeling.h:772
Concrete class that can be used to implement the reference-counting pattern.
Definition: RefCounted.h:109
A symbol in an expression could not be resolved to a function, parameter, or constant.
Interface adopted by an object which supplies values for parameters.
Definition: ParametricModeling.h:182
ParameterValue()
Definition: ParametricModeling.h:135
The units in which the value is stored (no conversions applied).
Operation cannot be performed on a domain parameter.
An operator or function was invoked with incorrect number of arguments.
A requested parameter value was not found to exist.
Definition: Bentley.h:210
Abstract representation of an expression involving parameters.
Definition: ParametricModeling.h:698
UnknownSymbolDetail m_unknownSymbol
Definition: ParametricModeling.h:621
ParameterType GetType() const
Definition: ParametricModeling.h:138
This section contains the visibility flags for each parameter.
This section contains a row for each of the local ("working") parameters defined on the model...
struct DgnPlatform::DgnElementECInstance const & DgnElementECInstanceCR
Definition: DgnPlatform.h:205
Provides Bentley specific text file read/write functions (Bentley/BeAssert.h).
The internal limit for number of arguments to functions accepting indeterminite number of arguments (...
Basic information about the parse result, providing the status and the position in the input string a...
Definition: ParametricModeling.h:535
struct DgnPlatform::ElementHandle const & ElementHandleCR
Definition: DgnPlatform.h:260
unsigned int uint32_t
Definition: Bentley.r.h:93
bool IsValid() const
Returns true if the specification identifies a valid ECInstance.
Definition: ParametricModeling.h:972
void SetDisplayLabel(WCharCP label)
Sets the user-visible parameter name.
Definition: ParametricModeling.h:323
bool IsDefinitionScope() const
If true, when the parametric model is placed as a cell, the value of this parameter cannot be overrid...
Definition: ParametricModeling.h:314
A read-only collection of parameter definitions.
Definition: ParametricModeling.h:828
WCharCP GetSymbolName() const
Returns the unrecognized symbol name.
Definition: ParametricModeling.h:612
WString m_accessString
Definition: ParametricModeling.h:294
DGNPLATFORM_EXPORT void ClearAll()
Sets to an empty state (no sections present)
Definition: ParametricModeling.h:788
ParameterType m_expected
Definition: ParametricModeling.h:557
HandlerId identifying an IParameterExpressionHandler.
Definition: ParametricModeling.h:714
An IECInstance represents an instance of an ECClass.
Definition: ECInstance.h:115
DGNPLATFORM_EXPORT void SetPresent(ParameterCsvSection section, bool present)
Toggles the presence of the specified section.
Definition: ParametricModeling.h:779
IncompatibleTypeDetail m_incompatibleType
Definition: ParametricModeling.h:619
WCharCP GetOpeningDelimiter() const
Returns the expected opening delimiter.
Definition: ParametricModeling.h:593
Interface adopted by an object which serves as the context for parsing parameter expressions.
Definition: ParametricModeling.h:653
A value was not of the type required by an operation.
An expression assigned to a parameter uses that parameter either directly or indirectly, resulting in an insoluble equation.
TextFileWriteStatus
The possible return values for text file writes.
Definition: BeTextFile.h:53
ParameterExpressionStatus GetStatus() const
Return the return status of the parse.
Definition: ParametricModeling.h:545
VirtualCollectionIterator< IParameterSetIterator > const_iterator
Definition: ParametricModeling.h:255
A collection of parameter sets.
Definition: ParametricModeling.h:253
Open and closed delimiters such as parentheses are not balanced within an expression.
Reads and Writes Text Files regardless of whether they are encoded on disk as locale-encoded ASCII...
Definition: BeTextFile.h:67
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
unsigned char uint8_t
Definition: Bentley.r.h:89
bool IsHidden() const
If true, when the parametric model is placed as a cell, this parameter will not be shown as a propert...
Definition: ParametricModeling.h:316
WCharCP GetAccessString() const
Returns the internal access string which is used to refer to the parameter in code.
Definition: ParametricModeling.h:309
A two-part identifier, consisting of a major ID and a minor ID.
Definition: DgnCore.h:21
A null value was encountered in a context in which null values are not supported. ...
unknown status (newly added to system)

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