Modules | Namespaces | Classes | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables
Relationship Manager

Relationship Manager is designed to handle networks of dependencies. More...

Modules

 Code Samples
 Brief code samples:
 

Namespaces

 Bentley::MstnPlatform
 Namespace for classes, methods and functions of the MstnPlatform library.
 
 Bentley::MstnPlatform::Relationship
 

Classes

struct  IPersistentParameterData
 Interface adopted by relationship parameters to make it possible to save and restore them. More...
 
struct  T_PeristentParameterValue< T >
 A persistent parameter that contains a scalar value of type T. More...
 
struct  PeristentParameterStringValue
 A persistent parameter that contains a string. More...
 
struct  IPropertyAccess
 A "pointer" to a property in a property holder. More...
 
struct  IPropertyProvider
 Interface adopted by elements that look up properties on an element. More...
 
struct  TempFile
 Knows how to create temporary elements. More...
 
struct  IGraphEvaluation
 A bi-partite graph of Relationship<->Element dependencies and the current state of reevaluation. More...
 
struct  IGraphEvaluation::RelationshipNodeInfo
 A structure of relationship node information. More...
 
struct  IGraphEvaluation::ElementNodeInfo
 
struct  IHandler
 Interface adopted by a class that handles Relation objects. More...
 
struct  HandlerBase
 Base class for relations. More...
 
struct  NulHandler
 Default handler for relations whose real handlers are missing. More...
 
struct  ITiming
 
struct  IGraphManagerEventHandler
 Interface adopted by apps that want to monitor graph manager events. More...
 
struct  ITokenFactory
 Creates Tokens. More...
 
struct  IRelationDependencyHelper
 Enrolls Relations that are affected by a change to the specified element. More...
 
struct  IManager
 Interface adopted by the one and only relationship manager. More...
 
struct  ExprErrorDetails
 Describes an error involving an Token. More...
 
struct  FmtArgs
 Formatting control. More...
 
struct  IExpression
 An expression is a persistent set of Tokens. More...
 
struct  IParserOperatorFactory
 Interface adopted by a class that can create operators as part of parsing an expression. More...
 
struct  IOperandValueStorage
 Interface adopted by a class that defines a property of an operand. More...
 
struct  OperandPropertyBase
 Base class for an object that represents a property of some operand. More...
 
struct  DerivedPropertyBase
 Base class for expression terms that are properties of properties. More...
 
struct  ElementProperty
 An expression term that is a reference to a property of a MicroStation element. More...
 
struct  BinOpCode
 Defines a format of binary operator code. More...
 
struct  UnOpCode
 Defines a format of unary operator code. More...
 
struct  Token
 Defines token structure with relative operations. More...
 
struct  OperatorToken
 Defines an operator of token. More...
 
struct  OperatorNop
 Defines no operation. More...
 
struct  StdBinOp
 Defines binary operator which has two operands. More...
 
struct  StdUnOp
 Defines unary operator which has only one operand. More...
 
struct  AssignOp
 Defines assignment operator. More...
 
struct  DotOp
 Defines dot operator. More...
 
struct  IndexOp
 Defines index operator. More...
 
struct  CommaOp
 Defines comma operator. More...
 
struct  ConditionalOp
 Defines conditional operator. More...
 
struct  LogicalOp
 Defines logical operator. More...
 
struct  OperandToken
 Defines operand token which represents a value in a formula expression. More...
 
class  ScalarPropertyValue< TTOKEN, TVALUE >
 A property that is just a value. More...
 
struct  ElementRefValue
 An expression term that is a reference to an element. More...
 
struct  ModelRefValue
 An expression term that is a reference to a model. More...
 
struct  GvValue
 An expression term that is a reference to an GV's value. More...
 
struct  StringValue
 An expression term that is a constant string. More...
 
struct  BooleanValue
 An expression term that is a constant Boolean value. More...
 
struct  DoubleValue
 An expression term that is a constant double value. More...
 
struct  IntValue
 An expression term that is a constant Int value. More...
 
struct  Int64Value
 An expression term that is a constant Int64 value. More...
 
struct  PointValue
 An expression term that is a constant DPoint3d value. More...
 
struct  VectorValue
 An expression term that is a constant Vec3d value. More...
 
struct  OrientationValue
 An expression term that is a constant RotMatrix value. More...
 
struct  LcsValue
 An expression term that is a constant Local Coordinate System value. More...
 
struct  ArrayValue
 An expression term that is a constant DPoint3d value. More...
 
struct  BltFns
 Defines an operation tool with a series of functions. More...
 
struct  TokenLoader
 Recreates Tokens from storage. More...
 
struct  Moniker
 A moniker is a pointer to an element. More...
 
struct  MonikerIterator
 Iterator for the Moniker XAttributes on an element. More...
 
struct  ParameterDataItemIterator
 Iterator for the IPersistentParameterData XAttributes on an element. More...
 
struct  ParameterQuery
 This is a convenience class. More...
 
struct  ParameterQueryRW
 This is a convenience class. More...
 
struct  Relation
 A "relationship" is a set of "parameters." A parameter has a unique ID within a relationship. More...
 
struct  RelationshipPropertyAccess
 Defines the accessing methods for relationship property. More...
 

Macros

#define UNITS_Base(u)   (Units)(UNITS_Base_&(u))
 
#define UNITS_MkSq(u)   (Units)(UNITS_Base_&(u) | UNITS_ExpSq)
 
#define UNITS_MkCu(u)   (Units)(UNITS_Base_&(u) | UNITS_ExpCu)
 
#define UNITS_GetExp(u)   (UNITS_ExpSq&(u)? 2: UNITS_ExpCu&(u)? 3: UNITS_Exp4&(u)? 4: 1)
 
#define UNITS_MkExpMask(x)   (2==(x)? UNITS_ExpSq: 3==(x)?UNITS_ExpCu: 4==(x)? UNITS_Exp4: 0)
 
#define UNITS_MkExp(u, xm)   (Units)( (UNITS_Exp_&(xm)) | (UNITS_Base_&(u)) )
 

Typedefs

typedef UInt32 HandlerPublicIdPart
 Public part of a Relationship::IHandler's ID. Must be a value allocated from the XAttributeHandlerMajorIDs value space. More...
 
typedef UInt32 HandlerPrivateIdPart
 Private part of a Relationship::IHandler's ID. This value can be anything. More...
 
typedef int ProcessRelationshipsInModelCallback (IHandler *, Relation const &, void *)
 
typedef UInt16 ParameterId
 A unique ID for a parameter in a set. More...
 
typedef RefCountedPtr< struct
IGraphEvaluation > 
IGraphEvaluationPtr
 
typedef struct
MstnPlatform::Relationship::IManager * 
IRelationshipManagerP
 
typedef struct
MstnPlatform::Relationship::IManager & 
IRelationshipManagerR
 

Enumerations

enum  RelationStatus {
  RELATION_STATUS_UpToDate = 0, RELATION_STATUS_Pending = 1, RELATION_STATUS_Violated = 2, RELATION_STATUS_Deferred = 4,
  RELATION_STATUS_Incomplete = 8, RELATION_STATUS_Disabled = 16, RELATION_STATUS_Circular = 32, RELATION_STATUS_New = 64,
  RELATION_STATUS_Alias =128, RELATION_STATUS_NotSatisfied
}
 The up-to-date status of a relationship. More...
 
enum  MonikerTargetStatus {
  MONIKER_TARGET_STATUS_Clear = 0, MONIKER_TARGET_STATUS_Changed = 1, MONIKER_TARGET_STATUS_Deleted = 2, MONIKER_TARGET_STATUS_Unresolved = 4,
  MONIKER_TARGET_STATUS_Resolved = 8, MONIKER_TARGET_STATUS_OutOfSpec = 16, MONIKER_TARGET_STATUS_NeedsRecompute, MONIKER_TARGET_STATUS_Unavailable
}
 The status of a parameter in a relationship. More...
 
enum  GraphBuildingOptions { GBOPTIONS_None =0, GBOPTIONS_DeferEnterGraph =1 }
 Options to control the graph-building algorithm. More...
 
enum  State { STATE_Other =0, STATE_BuildingGraph, STATE_Reevaluating, STATE_PostReevaluate }
 Define the states of graph processing. More...
 
enum  ExprErrorCode {
  EXPRESSION_ERROR_None, EXPRESSION_ERROR_UnsupportedOperation, EXPRESSION_ERROR_UnsupportedDataType, EXPRESSION_ERROR_InvalidCast,
  EXPRESSION_ERROR_InternalErrorMissingOperand, EXPRESSION_ERROR_UnresolvedGlobalVariableName, EXPRESSION_ERROR_NotAnLvalue, EXPRESSION_ERROR_ERange,
  EXPRESSION_ERROR_MissingDictionary, EXPRESSION_ERROR_StorageError, EXPRESSION_ERROR_DoesNotSupportProperties, EXPRESSION_ERROR_UnresolvedPropertyName,
  EXPRESSION_ERROR_NotSatisfied, EXPRESSION_ERROR_Syntax, EXPRESSION_ERROR_UnknownFunction, EXPRESSION_ERROR_BadUnits,
  EXPRESSION_ERROR_ElementNotFound, EXPRESSION_ERROR_HandlerNotFound, EXPRESSION_ERROR_BadVersion, EXPRESSION_ERROR_Unavailable
}
 Expression parsing and evaluate Error codes. More...
 
enum  Units {
  UNITS_None = 0, UNITS_Point = 1, UNITS_Distance = 2, UNITS_Angle = 3,
  UNITS_AngleDirection = 4, UNITS_DirectionVector = 5, UNITS_Other = 6, UNITS_Na = 7,
  UNITS_Radians = UNITS_None, UNITS_Boolean = 8, UNITS_Base_ = 0x3f, UNITS_Exp_ = ~UNITS_Base_,
  UNITS_ExpSq = 0x40, UNITS_ExpCu = 0x80, UNITS_Exp4 = 0xc0
}
 Defines the types of units. More...
 
enum  EvaluateMode { EVALUATE_MODE_Evaluate, EVALUATE_MODE_DiscoverOutputs, EVALUATE_MODE_CheckOutputEqualsExpression, EVALUATE_MODE_CheckOperandTypes }
 The reason why Evaluate has been called. More...
 
enum  TokenClsId {
  TOKENCLSID__Temporary__ =0, TOKENCLSID_StringValue =1, TOKENCLSID_DoubleValue =2, TOKENCLSID_PointValue =3,
  TOKENCLSID_BltFns =4, TOKENCLSID_StdAssignOp =5, TOKENCLSID_StdDotOp =6, TOKENCLSID_StdCommaOp =7,
  TOKENCLSID_GvValue =8, TOKENCLSID_OrientationValue =9, TOKENCLSID_StdBinOp =10, TOKENCLSID_StdUnOp =11,
  TOKENCLSID_VectorValue =12, TOKENCLSID_LCSValue =13, TOKENCLSID_ArrayValue =14, TOKENCLSID_StdConditionalOp =15,
  TOKENCLSID_BooleanValue =16, TOKENCLSID_StdLogicalOp =17, TOKENCLSID_StdIndexOp =18, TOKENCLSID_IntValue =19,
  TOKENCLSID_Int64Value =20, TOKENCLSID_FirstCustomClass =1000
}
 Token factory classIds. More...
 
enum  OpCode {
  OP_Ldexp = 1, OP_Atan2 = 2, OP_Pow = 3, OP_Add = 4,
  OP_Subtract = 5, OP_Multiply = 6, OP_Divide = 7, OP_Mod = 8,
  OP_LE = 9, OP_GE = 10, OP_LT = 11, OP_GT = 12,
  OP_EQ = 13, OP_NE = 14, OP_Xor = 15, OP_BitAnd = 16,
  OP_BitOr = 17, OP_Shl = 18, OP_Shr = 19
}
 Defines the type of binary operator. More...
 
enum  OpCode {
  OP_Cos = 1, OP_Acos = 2, OP_Sin = 3, OP_Asin = 4,
  OP_Atan = 5, OP_Tan = 7, OP_Cosh = 8, OP_Tanh = 9,
  OP_Sinh = 10, OP_Exp = 11, OP_Log = 13, OP_Log10 = 14,
  OP_Sqrt = 16, OP_Negate = 17, OP_NOT = 18, OP_Comp = 19
}
 Defines the type of unary operator. More...
 
enum  FnCode {
  FN_PointBetween = 1, FN_PointProjectToPlane = 2, FN_PointAddVector = 3, FN_PointSubtract = 4,
  FN_PointProjectToLine = 5, FN_VectorDirection = 6, FN_Point2d = 7, FN_VectorMagnitude = 8,
  FN_OrientationGetRotationAxis = 9, FN_OrientationGetRotationAngle = 10, FN_OrientationMultiply = 11, FN_OrientationGetAxis = 12,
  FN_OrientationXY = 13, FN_Point3d = 14, FN_Vector3d = 15, FN_VectorDotProduct = 16,
  FN_VectorCrossProduct = 17, FN_VectorAdd = 18, FN_VectorSubtract = 19, FN_VectorScale = 20,
  FN_Vector2d = 21, FN_OrientationRotate = 22, FN_OrientationXYZ = 23, FN_OrientationZ = 24,
  FN_OrientationXZ = 25, FN_VectorRotate = 26, FN_PointDistance = 27, FN_LCS = 28,
  FN_DistanceAlong = 29, FN_VectorNormalize = 30, FN_GetActiveModel = 31, FN_DictionaryFind = 32,
  FN_MasterUnits = 33, FN_SubUnits = 34, FN_UORs = 35
}
 Defines function types. More...
 
enum  SigType {
  SIG_PT, SIG_DBL, SIG_PT_PT, SIG_PT_VEC,
  SIG_VEC, SIG_VEC_VEC, SIG_VEC_DBL, SIG_ROT,
  SIG_ROT_ROT, SIG_ROT_DBL, SIG_DBL_DBL, SIG_ROT_PT,
  SIG_PT_LCS, SIG_ELM_STR
}
 Defines signal types. More...
 
enum  PriorToLoading { PriorToLoadingFlag }
 A flag used to determine if prior to loading. More...
 
enum  DeepCopyOption { DeepCopyOption_Off =0, DeepCopyOption_On =1 }
 A list options of deep-copy. More...
 
enum  ParameterDataItemFlags { PARAMETER_DATAITEM_FLAGS_Dirty =1 }
 

Functions

OperandToken * GetValue (StatusInt *errorDetails, ElementHandleCR eh)
 Query the property's value. More...
 
StatusInt SetValue (EditElementHandleR, OperandToken const &newValue)
 Update the property's value. More...
 
StatusInt CheckType (OperandToken const &newValue, ElementHandleCR)
 Check if the the property's value could by updated using the specified new value. More...
 
IPropertyAccess * FindPropertyByName (ElementHandleCR ehandle, WChar const *nm, void *context)
 Look up the specified property. More...
 
void EnumerateProperties (WStringVector &strVec, ElementHandleCR)
 Query the properties supported by the specified element. More...
 
StatusInt SaveChanges (EditElementHandleR ehandle)
 Called after one or more IPropertyAccess::SetValue calls have been made. More...
 
 TempFile ()
 
virtual ~TempFile ()
 
StatusInt GetTemporaryElement (EditElementHandleR tempEh, ElementRefP baseElement, WChar const *tempName)
 Get or create an element that is associated with the specified baseElement by name. More...
 
ElementRefP GetTempPropRef (ElementRefP baseElement, WChar const *propName)
 Short hand for: More...
 
bool IsTemporaryElement (ElementRefP)
 Query if the specified element was created in this TempFile. More...
 
StatusInt GetTemporaryElementName (WStringR name, ElementRefP tempElem)
 Get the description assigned to the temporary element when it was created. More...
 
StatusInt GetTemporaryElementBase (ElementRefP &baseRef, ElementRefP tempElem)
 Get the base element assigned to the temporary element when it was created. More...
 
void ClearTemporaryElements ()
 Free all elements allocated from this TempFile. More...
 
void ClearTempPropRefs ()
 Same as ClearTemporaryElements. More...
 
DgnModelRefP GetReferenceToModel (DgnModelRefP targetModel)
 Get (or create) a reference attachment from this tempfile to targetModel. More...
 
DgnModelRefP GetTempModel ()
 Get temp model. More...
 
virtual ~IGraphEvaluation ()
 Virtual desctructor. More...
 
void SetGraphBuildingOptions (GraphBuildingOptions o, bool set)
 Set graph building options. More...
 
State GetState () const
 Query what the graph evaluator is currently doing. More...
 
void TopologyChanged ()
 Reset the state of the graph evaluation. More...
 
bool WasReevaluated (Relation const &)
 Query if rel has been reevaluated yet. More...
 
bool WasElementChangedPriorTo (ElementRefP e1, ElementRefP e2)
 Query if e1 was changed "before" e2, considering the order in which changes arrived and the order in which elements appear in a breadth-first search. More...
 
void RemoveRelationshipsAndSubstituteBlock (Relation const &blockRel, ElementRefVector const &relsInBlock)
 Substitutes blockRel for the relationships in relsInBlock. More...
 
bool IsSelfLoop (Relation const &)
 Does the specified relation take any of its own outputs as an input? More...
 
void EnrollElement (ElementRefP elRef, Relation const &rel)
 Tell the graph about a potentially new element. More...
 
void EnrollRelationship (Relation const &rel, ElementRefP elRef)
 Tell the graph about a potentially new relationship. More...
 
void AddOutput (Relation const &rel, ElementRefP elRef)
 Declare that elRef is an output of rel. More...
 
void RemoveOutput (Relation const &rel, ElementRefP el)
 Remove el as an output of rel. More...
 
void AddInput (Relation const &rel, ElementRefP elRef)
 Declare that elRef is an input to rel. More...
 
void RemoveInput (Relation const &rel, ElementRefP elRef)
 Remove el as an input to rel. More...
 
void AddOutput (Relation const &, Moniker &)
 Add the element identified by the specified moniker as an output of the relation. More...
 
void RemoveOutput (Relation const &, Moniker &)
 Remove the element identified by the specified moniker from the outputs of the relation. More...
 
void AddInput (Relation const &, Moniker &)
 Add the element identified by the specified moniker as an input to the relation. More...
 
void RemoveInput (Relation const &, Moniker &)
 Remove the element identified by the specified moniker from the inputs of the relation. More...
 
StatusInt RemoveRelationship (Relation const &rel, bool suppress=true)
 Remove the specified relationship from the graph and optionally mark it as suppressed. More...
 
void RemoveElement (ElementRefP elRef)
 Remove the specified element from the graph. More...
 
StatusInt GetElementConnections (ElementRefVector *inputTo, ElementRefVector *outputFrom, ElementRefP elRef)
 Query the relations to which the specified element is connected. More...
 
StatusInt GetRelationshipConnections (ElementRefVector *inputs, ElementRefVector *outputs, Relation const &rel)
 Query the elements to which the specified relation is connected. More...
 
RelationshipNodeInfo GetRelationshipNodeInfo (Relation const &)
 Query information about the specified relationship as a node in the graph. More...
 
ElementNodeInfo GetElementNodeInfo (ElementRefP)
 Query information about the specified element as a node in the graph. More...
 
void GetRelationshipsInTopologicalOrder (ElementRefVector &rels)
 Get the list of relationships to be reevaluated, in topological order. More...
 
void WhatIfChanged (ElementRefVector const &changedEls, ElementRefVector const &changedRels)
 Evaluates what would happen if the specified elements were changed. More...
 
RefRefPairVectorVector const & GetCycles () const
 Get the list of all cycles in the graph. More...
 
bool IsOutputOfAny (ElementRefP) const
 Query if there is any output information. More...
 
void ReverseRelation (Relation const &)
 Reverse relation. More...
 
void Dump ()
 Dump current information. More...
 
void GetRelationshipsRemovedByBlockSubstitute (ElementRefVector &relsInBlock, Relation const &blockRel)
 Returns the list of relations for which blockRel was added as a substitute. More...
 
StatusInt CreateTemporaryRelationshipElement (EditElementHandleR eh, HandlerPublicIdPart amid, HandlerPrivateIdPart actid)
 Create a relation that will exist only as long as the IGraphEvaluation object exists. More...
 
void OnParameterChange (Relation &rel, ParameterId pid, MonikerIterator &miter, MonikerTargetStatus change)
 Callback invoked when the target of a moniker has been changed. More...
 
void OnParameterUndoRedo (Relation &rel, ParameterId pid, MonikerIterator &miter, MonikerTargetStatus change)
 Callback invoked when a change to a parameter has been undone or redone. More...
 
void OnRelationshipChange (Relation &rel)
 Callback invoked when the relationship element itself has been added, changed, or deleted. More...
 
void OnRelationshipUndoRedo (Relation &rel)
 Callback invoked when a add, change, or deletion of the relationship element itself has been undone or redone. More...
 
StatusInt Delete (Relation &rel)
 Delete a relationship by deleting the relationship element. More...
 
bool EnterGraph (IGraphEvaluation &, Relation const &rel)
 Callback invoked when the relationship element has been put into the relationship graph. More...
 
bool EnteredGraph (IGraphEvaluation &, Relation const &rel)
 Callback invoked after the graph has been built but before the schedule has been computed. More...
 
void Reevaluate (IGraphEvaluation &graph, Relation &rel)
 Callback invoked after all parameter changes have been recorded and the relationship should be reevaluated. More...
 
void Reevaluated (IGraphEvaluation *graph, Relation &rel)
 Callback invoked after all relationships in the graph have been reevaluated. More...
 
bool IsSatisfied (IGraphEvaluation *graph, Relation const &rel)
 The handler should check if the relationship is satisfied. More...
 
bool IsComplete (IGraphEvaluation *graph, Relation const &rel)
 If the relationship can be reevaluated, then the handler should return true. More...
 
StatusInt FindPropertyByName (UInt32 *propId, IGraphEvaluation *graph, Relation const &rel, WChar const *nm)
 Ask the relationship to look up the specified property. More...
 
void EnumerateProperties (WStringVector &strVec, Relation const &rel)
 The relationship should return the properties that it supports. More...
 
OperandToken * GetPropertyValue (StatusInt *errorDetails, IGraphEvaluation *graph, Relation const &rel, UInt32 propId)
 Get a relationship property value. More...
 
StatusInt SetPropertyValue (IGraphEvaluation *graph, Relation &rel, UInt32 propId, OperandToken const &newValue)
 Set a relationship property value. More...
 
StatusInt CheckPropertyType (IGraphEvaluation *graph, Relation const &rel, UInt32 propId, OperandToken const &newValue)
 Check the type of the proposed new value for a property. More...
 
StatusInt SavePropertyChanges (IGraphEvaluation *graph, Relation &rel)
 One or more calls to SetPropertyValue have been made. More...
 
WString GetDescription (Relation const &rel)
 Provide a brief description of the relationship. More...
 
WString GetStatusDetails (Relation const &rel)
 Provide a brief explanation of the relationship's current status. More...
 
StatusInt OnRelationshipTransformed (Relation &rel, TransformInfoCR t)
 Callback invoked when the relationship element itself has been transformed. More...
 
virtual void StartTiming ()=0
 
virtual void EndTiming ()=0
 
 IGraphManagerEventHandler ()
 Constructor. More...
 
void OnReevaluate (IGraphEvaluation const &graph)
 Called after each graph reevaluation. More...
 
void OnReevaluationsFinished ()
 Called after all graph reevaluations are finished, including the reevaluation triggered by direct changes and all follow-up reevaluations triggered by discoveries. More...
 
void OnRelationshipDeleted (ElementRefP ref, DgnModelRefP model, bool isUndoRedo)
 Called after relationship deleted. More...
 
void OnRelationshipAdded (ElementRefP ref, DgnModelRefP model, bool isUndoRedo)
 Called after relationship added. More...
 
void OnCyclesDetected (IGraphEvaluation &graph)
 The graph contains cycles. More...
 
Token * Create (IExpression const *)
 Create a new Token with an IExpression. More...
 
void EnrollDependentRelations (IGraphEvaluation &graph, ElementHandleCR eh)
 Enroll dependent relations. More...
 
void Reevaluate (GraphBuildingOptions gbOptions=GBOPTIONS_DeferEnterGraph)
 Reevaluate all relationships affected by direct changes and all relationships affected indirectly by them. More...
 
void DisableReevaluation ()
 Disable reevaluation. This is useful when bulk loading relationships. More...
 
void EnableReevaluation ()
 Re-enable reevaluation. This is useful when finished with bulk loading relationships. More...
 
bool IsReevaluationDisabled () const
 Check if reevaluation is disabled. More...
 
void DeclareDeferredChanges (ElementRefP relRef, bool allMonikers)
 This function scans the specified relationship and detects all parameters with a status of MONIKER_TARGET_STATUS_NeedsRecompute. More...
 
void DeclareDirectChange (ElementRefP ref)
 Declare that the specified element was directly changed (even if it wasn't). More...
 
void DeclareDiscovery (ElementRefP ref)
 Declare that the specified element was discovered. More...
 
void EnableRelationship (ElementRefP ref, bool enable)
 This function marks the relationship as enabled or disabled. More...
 
IHandler * RegisterHandler (HandlerPublicIdPart pubid, HandlerPrivateIdPart privid, IHandler *handler)
 Register an relationship handler by the specified Id. More...
 
void UnRegisterHandlerStar (HandlerPublicIdPart pubid)
 Un-register all relationship handlers with the specified public id part. More...
 
void RegisterEventHandler (IGraphManagerEventHandler *eventHandler)
 Register a relationship event-handler. More...
 
void UnRegisterEventHandler (IGraphManagerEventHandler *eventHandler)
 Un-register an event-handler. More...
 
void RegisterIRelationDependencyHelper (IRelationDependencyHelper *h)
 Register an IRelationDependencyHelper. More...
 
void UnRegisterIRelationDependencyHelper (IRelationDependencyHelper *h)
 Un-register an IRelationDependencyHelper. More...
 
IHandler * GetHandler (Relation const &rel)
 Find the relationship handler for the specified relationship. More...
 
void GetTargets (ElementRefVector &targets, Relation const &rel)
 Query the targets of the specified relationship. More...
 
IGraphEvaluationPtr WhatIfChanged (ElementRefVector const &changedEls, ElementRefVector const &changedRels, GraphBuildingOptions gbOptions=GBOPTIONS_DeferEnterGraph)
 Evaluates what would happen if the specified element were changed. More...
 
bool IsComponent (ElementHandleCR eh)
 Check if the specified element is a cell that contains relationships. More...
 
bool IsRelationshipElement (ElementHandleCR eh)
 Check if the specified element is a relationship element, i.e., if it has a Relation XAttribute. More...
 
bool IsDictionaryElement (ElementHandleCR eh)
 Check if the specified element is a global variable dictionary or expression table. More...
 
int GetTraceLevel () const
 Get the trace level. More...
 
void SetTraceLevel (int level, FILE *fp)
 Set the trace level. More...
 
int ProcessRelationshipsInModel (DgnModelRefP modelRef, ProcessRelationshipsInModelCallback *callback, void *arg2, UShort const *types=0, UShort sizeofTypes=0)
 Invoke callback on each relationship in the specified model. More...
 
int ProcessRelationshipsInCell (ElementHandleCR cell, ProcessRelationshipsInModelCallback *callback, void *arg2)
 Invoke callback on each relationship in the specified cell. More...
 
WString GetDesc (IHandler *handler, Relation const &rec)
 Get description of the specified relationship. More...
 
StatusInt DeleteRelationship (Relation &rel)
 Delete a relationship, just delete the relationship element. More...
 
void GetRelationshipsThatOutputGv (ElementRefVector &rels, IGraphEvaluation *graph, GlobalVariableDictionaryIterator const &iGv)
 Query the relationships that (might) Output and therefore determine the value of the specified global variable. More...
 
void GetRelationshipsThatInputGv (ElementRefVector &rels, IGraphEvaluation *graph, GlobalVariableDictionaryIterator const &iGv)
 Query the relationships that (might) Input and therefore determine the value of the specified global variable. More...
 
void GetRelationshipsThatDependOnElement (ElementRefVector &connectedRels, ElementRefP elRef)
 Query the relationships that (might) use the specified element. More...
 
WString GetStatusDetails (Relation const &rel)
 Get the details of status. More...
 
void RegisterHandlers ()
 Trigger static initialization of relationship manager. More...
 
IManager * GetManager ()
 Return a pointer to the one and only relationship manager. More...
 
IPropertyProvider * getPropertyProvider (ElementHandleCR targetElement)
 Return a pointer to the object that looks up properties on the specified element. More...
 
void relationshipDebug_registerTiming (ITiming *tm)
 Register timing. More...
 
void relationshipDebug_unRegisterTiming (ITiming *tm)
 Unregister timing. More...
 
WString relationshipDebug_getDefaultMonikersDesc (Relation const &crel)
 Get the description of default monikers. More...
 
WString relationshipDebug_getDefaultRelationshipDesc (Relation const &rel)
 Get the description of default relationship. More...
 
WString fmtComponentProperties (ElementHandleCR ehandle)
 Format the component properties in GlobalVariableDictionary. More...
 
WString fmtElementProperties (ElementHandleCR ehandle)
 Format the element properties. More...
 
StatusInt writeXaChanges (EditElementHandleR eh)
 Write XAttribute changes. More...
 
StatusInt relationship_elementHandleRewrite (EditElementHandleR edh)
 Rewrite element handle. More...
 
WString fmtRelationshipStatus (Relation const &rel)
 Format the status of relationship. More...
 
WString fmtElementRef (ElementRefP ref)
 Format element. More...
 
WString fmtElementRef3 (ElementRefP ref)
 Format element without showing internal name. More...
 
WString fmtElementRef4 (ElementRefP ref)
 Format element with showing internal name. More...
 
StatusInt stripAllRelationshipXas (Relation &rel)
 Strip all relationship XAttributes for the specified Relation. More...
 
StatusInt stripAllMonikerXas (Relation &rel)
 Strip all moniker XAttributes for the specified relationship. More...
 
DgnPlatform::ElementHandle getTopLevelElement (ElementHandleCR elem)
 Get the top level element handle. More...
 
ElementRefP getTopLevelElement (ElementRefP ref)
 Get the top level element ref. More...
 
void graphEvaluation_test ()
 Test graph evaluation. More...
 
void dot_writeGraph (char const *fileName, IGraphEvaluation &graph)
 Write a graph to ATT Graphviz "dot" file format. More...
 
void relationship_staticInitialize ()
 You must call this function at least once before using relationship mgr. More...
 
void relationship_cleanTables ()
 Clean tables. More...
 
void relationship_initializeApp ()
 Initialize application. More...
 
 ExprErrorDetails (Token const *x, ExprErrorCode e)
 Constructor with parameters. More...
 
 ExprErrorDetails (Token const *x, ExprErrorCode e, WChar const *whatFailed, Token const *x2)
 Constructor with parameters. More...
 
 ExprErrorDetails (Token const *x, ExprErrorCode e, char const *whatFailed, Token const *x2)
 Constructor with parameters. More...
 
 ExprErrorDetails (Token const *x, ExprErrorCode e, BinOpCode op, Token const *rhs)
 Constructor with parameters. More...
 
 ExprErrorDetails (Token const *x, ExprErrorCode e, UnOpCode op)
 Constructor with parameters. More...
 
 ExprErrorDetails ()
 Constructor. More...
 
 ExprErrorDetails (ExprErrorDetails const &e2)
 Generate a new ExprErrorDetails from another one. More...
 
ExprErrorDetails & operator= (ExprErrorDetails const &e2)
 Endow to current ExprErrorDetails with a given one. More...
 
 ~ExprErrorDetails ()
 Destructor. More...
 
WString Fmt () const
 Formats the error information. More...
 
 FmtArgs (DgnModelRefP m)
 Generate a new FmtArgs from a DgnModelRefP. More...
 
virtual ~IExpression ()
 Destructor. More...
 
void AddToken (Token *t)
 Add a token to the expression during expression creation. More...
 
ExprErrorDetails Evaluate (OperandToken **result=0) const
 Evaluate the expression. More...
 
ExprErrorDetails const & GetLastError () const
 Get error resulting from most recent evaluation. More...
 
IGraphEvaluation * GetGraphEvaluation () const
 Query the graph evaluation context in which Evaluate is called. More...
 
EvaluateMode GetEvaluateMode () const
 Query the purpose of evaluation. More...
 
void SetSkipRelativeToCurrent (int startSkip, int nSkip) const
 Set skipping section. More...
 
Token * GetTokenInRpnRelativeToCurrent (int i) const
 Get token in the token vector at a given index. More...
 
GlobalVariableDictionaryChain & GetDictionaryChain () const
 Get the global variable dictionary chain to be used to resolve identifiers in the expression. More...
 
DgnModelRefP GetModelRef () const
 Get the model where the expression itself is stored. More...
 
ElementProperty * GetElementProperty (ElementHandleCR targetElement, WChar const *propName, OperandToken const *base) const
 Ask the expression for the property ref token that should be used to access the specified property of the specified element. More...
 
ElementPropertyMap const * GetElementProperties () const
 Query the property references used by the expression. More...
 
OperatorToken * Create (IExpression *x, char const *identifier)
 Create the operator identified during parsing of an expression. More...
 
virtual ~IOperandValueStorage ()
 Virtual destructor. More...
 
void AddRef ()
 Add one to ref count. More...
 
void Release ()
 Subtract one from ref count. More...
 
OperandToken * GetValue (ExprErrorDetails *error) const
 Get an OperandToken from an ExprErrorDetails. More...
 
ExprErrorDetails SetValue (OperandToken *token)
 Set error details with a token. More...
 
WString Fmt () const
 Format current object. More...
 
 OperandPropertyBase ()
 
virtual ~OperandPropertyBase ()
 
OperandToken const * GetBase () const
 Get current operand token. More...
 
WChar const * GetPropertyName () const
 Get current property name. More...
 
IExpression const * GetExpression () const
 Get current expression. More...
 
IGraphEvaluation * GetGraph () const
 Get current graph. More...
 
 DerivedPropertyBase ()
 Generate an object of DerivedPropertyBase. More...
 
virtual ~DerivedPropertyBase ()
 Destructor. More...
 
 ElementProperty (ElementHandleCR targetElement, WChar const *propName, ElementRefP tempPropRef, OperandToken const *base)
 Generate an object of ElementProperty with parameters. More...
 
 ElementProperty (IPropertyAccess *)
 Generate an object of ElementProperty with an IPropertyAccess. More...
 
virtual ~ElementProperty ()
 Destructor. More...
 
DgnPlatform::ElementHandle GetTargetElement () const
 Get the target element. More...
 
ElementRefP GetTempPropRef () const
 Get the temp property element ref. More...
 
bool IsResolved (ExprErrorDetails *e=0) const
 Is the target property resolved? More...
 
 BinOpCode (TokenClsId c, UInt16 o)
 
WString FmtValue (FmtArgs const &) const
 Format current members to a binary operator code. More...
 
 UnOpCode (TokenClsId c, UInt16 o)
 
WString FmtValue (FmtArgs const &) const
 Format current members to an unary operator code. More...
 
 Token ()
 Generate an object of Token. More...
 
virtual ~Token ()
 Destructor. More...
 
void AddRef ()
 Add one to ref count. More...
 
void Release ()
 Subtract one from ref count. More...
 
TokenClsId GetClsId () const
 Get current TokenClsId. More...
 
WString FmtValue (FmtArgs const &) const
 Format to a Token string. More...
 
WString FmtType () const
 Get the short type name of this Token. More...
 
static ITokenFactory * RegisterTokenFactory (TokenClsId clsid, ITokenFactory *handler)
 Register a factory to create Tokens associated with the specified clsid. More...
 
static void UnRegisterTokenFactory (TokenClsId clsid)
 Un-register the Token factory registered under this clsid. More...
 
static ITokenFactory * LookupTokenFactory (TokenClsId clsid)
 Query the factory registered to create Tokens associated with the specified clsid. More...
 
 OperatorToken (IExpression const *x)
 
ExprErrorDetails DoOperation (TokenOperandStack *) const
 Execute this operation. More...
 
 OperatorNop ()
 
virtual ExprErrorDetails _DoOperation (TokenOperandStack *) const
 
static IParserOperatorFactory * GetParserOperatorFactory ()
 Gets a static IParserOperatorFactory. More...
 
 StdBinOp (IExpression const *)
 Generates a default binary operation. More...
 
 StdBinOp (IExpression const *, OpCode)
 Generates a binary operator with a given operator code. More...
 
static bool IsLogicalOperator (OpCode opCode)
 Gets if an operator code is logical. More...
 
static StatusInt GetResultingUnits (Units *resu, Units lu, Units ru, OpCode op)
 Gets the units of result. More...
 
static IParserOperatorFactory * GetParserOperatorFactory ()
 Gets a static IParserOperatorFactory. More...
 
static bool IsLogicalOperator (OpCode opCode)
 Gets if an operator code is logical. More...
 
 StdUnOp (IExpression const *)
 Generates a default unary operator. More...
 
 StdUnOp (IExpression const *, OpCode opCode)
 Generates an unary operator with a given operator code. More...
 
 AssignOp (IExpression const *x)
 
 DotOp (IExpression const *)
 Generates a dot operator. More...
 
 IndexOp (IExpression const *)
 Generates an index operator. More...
 
 CommaOp (IExpression const *)
 Generates a comma operator. More...
 
 ConditionalOp (IExpression const *, UInt16 childCount, bool isBookend)
 Generates a conditional operator. More...
 
 LogicalOp (IExpression const *, bool isAnd, UInt16 childCount, bool isBookend)
 
 OperandToken (IExpression const *)
 Generates an operand token. More...
 
virtual ~OperandToken ()
 Destructor. More...
 
OperandToken * ApplyBinOp (ExprErrorDetails *error, BinOpCode opCode, OperandToken const *operand) const
 Executes a binary operator with the given binary type and operand. More...
 
OperandToken * ApplyUnOp (ExprErrorDetails *error, UnOpCode opCode) const
 Executes an unary operator with the given binary type and operand. More...
 
OperandToken * GetItemByIndex (ExprErrorDetails *error, OperandToken const *indexValue) const
 Gets item by a given index. More...
 
IOperandValueStorage * GetProperty (ExprErrorDetails *error, WChar const *name) const
 Gets property by name. More...
 
OperandToken * GetValue (ExprErrorDetails *error) const
 Gets current operand token. More...
 
OperandToken * GetValueAs (ExprErrorDetails *error, const type_info &typeWanted) const
 Gets current operand token. More...
 
bool IsEqualValue (OperandToken *rhs) const
 Gets if current operand is equal with the given one. More...
 
Units GetUnits () const
 Gets the units of current operand. More...
 
ExprErrorDetails ApplyUnits (Units unit, DgnModelRefP modelRef, char const *unitsStr)
 Applies units. More...
 
WString FmtUnits () const
 Formats current units. More...
 
void SetExpression (IExpression const *expression)
 Sets expression. More...
 
IExpression const * GetExpression () const
 Gets expression. More...
 
IOperandValueStorage * GetValueStorage () const
 Gets current operand value storage. More...
 
void SetValueStorage (IOperandValueStorage const *val)
 Sets current operand value storage. More...
 
template<typename T >
T * tokenOperand_cast (ExprErrorDetails *error, OperandToken const *operand)
 Casts operand token as a given type. More...
 
template<typename T >
T * tokenOperand_cast (OperandToken const *operand)
 Casts operand token as a given type. More...
 
template<typename T >
StatusInt tokenOperand_checkType (OperandToken const &operand)
 Checks if the input operand token is a given type or not. More...
 
 ElementRefValue (IExpression const *, ElementHandleCR)
 Generates an ElementRefValue with ElementHandle. More...
 
virtual ~ElementRefValue ()
 Destructor. More...
 
DgnPlatform::ElementHandle GetTargetElement () const
 Gets target element. More...
 
 ModelRefValue (IExpression const *, DgnModelRefP)
 Generates a ModelRefValue with DgnModelRef. More...
 
virtual ~ModelRefValue ()
 Destructor. More...
 
 GvValue (IExpression const *)
 Generates a GvValue by an IExpression. More...
 
 GvValue (IExpression const *, WChar const *)
 Generates a GvValue by an IExpression and name. More...
 
 GvValue (IExpression const *, GlobalVariableDictionaryChain *, WChar const *)
 Generates a GvValue by an IExpression, a name and a GlobalVariableDictionaryChain. More...
 
virtual ~GvValue ()
 Destructor. More...
 
DgnPlatform::ElementHandle GetTargetElement () const
 Gets target element. More...
 
DgnPlatform::ElementHandle GetGvElement () const
 Gets GV element. More...
 
Relation * GetGvRelation () const
 Gets GV relation. More...
 
bool IsResolved (ExprErrorDetails *e=0) const
 Gets if current GV value is resolved or not. More...
 
StatusInt Resolve (ExprErrorDetails *e) const
 Resolves current GV value. More...
 
WChar const * GetGvName () const
 Gets current GV name. More...
 
 StringValue ()
 Generates a default StringValue (NULL) More...
 
 StringValue (WChar const *s)
 Generates a StringValue with a given string. More...
 
virtual ~StringValue ()
 Destructor. More...
 
 BooleanValue ()
 Generates a Boolean value with a default value(false) More...
 
 BooleanValue (bool b)
 Generates a Boolean value with a given value. More...
 
 DoubleValue ()
 Generates a DoubleValue with a default one. More...
 
 DoubleValue (double d, Units)
 Generates a double value with a couple given value. More...
 
 IntValue ()
 Generates an IntValue with a default value(0) More...
 
 IntValue (Int32 d)
 Generates an IntValue with a given value. More...
 
 Int64Value ()
 Generates an Int64Value with a default value(0) More...
 
 Int64Value (Int64 d)
 Generates an Int64Value with a given value. More...
 
 PointValue ()
 Generates a PointValue with a default one(NULL) More...
 
 PointValue (DPoint3dCR d)
 Generates a PointValue with a given value. More...
 
 VectorValue ()
 Generates a VectorValue with a default value(NULL) More...
 
 VectorValue (DVec3d const &d)
 Generates a VectorValue with a given value. More...
 
bool IsUnitVector () const
 Gets if current vector value is an unit one. More...
 
 OrientationValue ()
 Generates an OrientationValue with a default value(NULL) More...
 
 OrientationValue (RotMatrix const &r)
 Generates an OrientationValue with a given value. More...
 
 LcsValue ()
 Generates a LcsValue with a default value(NULL) More...
 
 LcsValue (Transform const &r)
 Generates a LcsValue with a given value. More...
 
 ArrayValue ()
 Generates an ArrayValue with a default value(NULL) More...
 
virtual ~ArrayValue ()
 Destructor. More...
 
UInt16 GetCount () const
 Gets the size of current array. More...
 
UInt16 AddItem (OperandToken *token)
 Adds an item into current array. More...
 
StatusInt RemoveItem (UInt16 i)
 Removes an item from current array. More...
 
OperandToken * GetItem (UInt16 i) const
 Gets item at a given index. More...
 
 BltFns (IExpression const *)
 Generates a BltFns with an IExpression. More...
 
 BltFns (IExpression const *, FnCode)
 Generates a BltFns with an IExpression and FnCode. More...
 
virtual OperandToken * Apply1 (ExprErrorDetails *, OperandToken const *) const
 Applies the relative functions with one operand. More...
 
virtual OperandToken * Apply2 (ExprErrorDetails *, OperandToken const *, OperandToken const *) const
 Applies the relative functions with two operands. More...
 
virtual OperandToken * Applyn (ExprErrorDetails *, TokenOperandStack *) const
 Applies the relative functions with more than two operands. More...
 
 TokenLoader (IExpression const *)
 Generates a TokenLoader with an IExpression. More...
 
 TokenLoader (IExpression const *, Token *, bool doAddRef=true)
 Generates a TokenLoader with an IExpression, a Token and a bool value which represents if add ref for this token or not. More...
 
 TokenLoader (IExpression const *, Token const *)
 Generates a TokenLoader with an IExpression, a Token. More...
 
 ~TokenLoader ()
 Destructor. More...
 
void SetToken (Token *token)
 Sets token. More...
 
void ReleaseToken ()
 Releases current token. More...
 
 Moniker ()
 Support for vector of Moniker. More...
 
 Moniker (Moniker const &)
 
Moniker & operator= (Moniker const &m)
 
 Moniker (DgnModelRefP home, PriorToLoading)
 Initialize a Moniker prior to loading. More...
 
 Moniker (PersistentSnapPathCR)
 Initialize a Moniker that captures the specified DgnPlatform::PersistentSnapPath. More...
 
 Moniker (DgnModelRefP home, DgnPlatform::AssocPoint const &, DeepCopyOption dco=DeepCopyOption_On)
 Initialize a Moniker that captures the specified DgnPlatform::AssocPoint. More...
 
 Moniker (DgnModelRefP home, PersistentElementPathCR, DeepCopyOption dco=DeepCopyOption_On)
 Initialize a Moniker that captures the specified DgnPlatform::PersistentElementPath. More...
 
void SetDeepCopyOption (DeepCopyOption option)
 Specify if root should be deep-copied when the relation that owns this moniker is copied. More...
 
DeepCopyOption GetDeepCopyOption () const
 Check if root should be deep-copied when the relation that owns this moniker is copied. More...
 
bool IsValid () const
 Check if the Moniker contains path data. More...
 
DgnModelRefP GetHomeModelRefP () const
 Query the model of the reference holder. More...
 
void SetHomeModelRef (DgnModelRefP m)
 Set the home model ref. More...
 
bool IsTargetAvailable () const
 Query if all targets can be found. More...
 
StatusInt GetPaths (DisplayPathPtr &path1, DisplayPathPtr &path2)
 Get one or both target elements. More...
 
StatusInt EvaluatePoint (DPoint3d &pt)
 Get the point identified by the snap. More...
 
bool IsStaticDPoint3d () const
 Query if this moniker contains only static (x,y,z) data. More...
 
bool HasTwoPaths () const
 Query if the moniker has two paths. More...
 
DgnPlatform::ElementHandle EvaluateElement (bool wantFirst=true) const
 Get (first) target element. More...
 
DgnPlatform::ElementHandle EvaluateReferenceAttachment (bool wantFirst=true) const
 Get the reference attachment used to access the (first) target element. More...
 
bool DependsOnElementRef (ElementRefP target) const
 Does the moniker depend on this ElementRefP? If host and target are in same model and if target is not a shared cell instance, then this is the same as EvaluateElement().GetElementRef() == target. More...
 
WString GetDescription () const
 Get a brief description of the moniker. More...
 
void Clear ()
 Cause the moniker to forget its current target and free its internal resources. More...
 
bool EqualsLocalElement (DgnPlatform::ElementId eId) const
 Convenience method to see if current element is equal with the local one. More...
 
Moniker GetMoniker () const
 Gets a Moniker. More...
 
WString GetDescription () const
 Gets the description of current iterator. More...
 
WString GetStatusDetails () const
 Gets the details of status. More...
 
StatusInt GetPersistentParameter (IPersistentParameterData &data) const
 Get the custom parameter data associated with the current parameter. More...
 
 ParameterQuery (Relation const &, ParameterId)
 
 ParameterQuery (Relation const &, ElementRefP)
 
 ~ParameterQuery ()
 
Relation const & GetRelation () const
 Gets current Relation ready to use. More...
 
ParameterId GetId () const
 Gets current parameter Id to query. More...
 
bool IsChanged ()
 Gets if the moniker target status has changed or not Note: If a parameter has a moniker, it also has a MonikerTargetStatus value, which has more information about the change to the target element. More...
 
bool IsTargetAvailable ()
 Query if the target is available, i.e., resolved and not deleted. More...
 
DgnPlatform::ElementHandle EvaluateElement (bool wantFirst=true)
 Try to get a handle on the referenced element. More...
 
bool HasMoniker ()
 Does this parameter represent a reference to another element? See Relation for methods to add/delete monikers. More...
 
Moniker GetMoniker ()
 Query this parameter's element reference. More...
 
MonikerIterator & GetMonikerIterator ()
 Query this parameter's element reference. More...
 
bool HasData ()
 Does this parameter have additional data? More...
 
StatusInt GetData (IPersistentParameterData &pd)
 Gets the additional data for this parameter. More...
 
ParameterDataItemIterator & GetDataIterator ()
 GetS a reference to the additional data for this parameter. More...
 
void InvalidateIters ()
 Re-computes iterators. More...
 
 ParameterQueryRW (Relation &, ParameterId)
 
Relation & GetRelation () const
 Gets current Relation ready to use. More...
 
StatusInt UpdateData (IPersistentParameterData const &pd)
 Updates the custom data associated with the specified parameter. More...
 
StatusInt UpdateMoniker (Moniker const &moniker)
 Updates current moniker. More...
 
 ~Relation ()
 Clean up. More...
 
 Relation ()
 Prep for load from persistent storage. More...
 
 Relation (ElementRefP, DgnModelRefP modelRef)
 Set up to read and write relationship data on the specified element. More...
 
 Relation (MSElementDescrP, bool ownsElement)
 Set up to read and write relationship data on the specified element. More...
 
 Relation (MSElementDescrCP)
 Set up to read relationship data on the specified element. More...
 
 Relation (MSElementDescrP ed, HandlerPublicIdPart amid, HandlerPrivateIdPart actid, bool relTakesOwnership, DgnModelRefP m=0)
 Prepare for creating new relationship. More...
 
 Relation (ElementRefP, DgnModelRefP, HandlerPublicIdPart amid, HandlerPrivateIdPart actid)
 Prepare for creating new relationship. More...
 
bool IsOpenOnElement (bool evenIfDeleted=false) const
 Query if relationship was detected on host element. More...
 
EditElementHandleR GetElemHandle () const
 Get the element handle of the relationship element itself. More...
 
void SetStatusFlag (RelationStatus flagToTurnOn)
 Set the specified status flags. More...
 
void ClrStatusFlag (RelationStatus flagToTurnOff)
 Clear the specified status flags. More...
 
bool TstStatusFlag (RelationStatus flag) const
 Test if all of the specified status flags are set. More...
 
RelationStatus GetStatus () const
 Get current status. More...
 
void SetUpToDate ()
 Clear all change flags => the relationship is up to date. More...
 
bool IsUpToDate () const
 Test if no change flags are set => the relationship is up to date. More...
 
HandlerPublicIdPart GetHandlerPublicIdPart () const
 Query relationship's relationship handler. More...
 
void SetHandlerPublicIdPart (HandlerPublicIdPart aid)
 Set relationship's relationship handler. More...
 
HandlerPrivateIdPart GetHandlerPrivateIdPart () const
 Query relationship handler's private value Note: handler private key part is meaningful only to the relationship handler. More...
 
void SetHandlerPrivateIdPart (HandlerPrivateIdPart aid)
 Set relationship handler's value Note: a handler private key part is meaningful only to the relationship handler. More...
 
ParameterDataItemIterator BeginParameterDataItems () const
 Get an iterator over custom parameter data items. More...
 
ParameterDataItemIterator FindParameterDataItem (ParameterId pid) const
 Find the custom data associated with the specified parameter. More...
 
bool HasParameterDataItem (ParameterId pid) const
 Query if the specified parameter exists and has custom data associated with it. More...
 
StatusInt DropParameterDataItem (ParameterDataItemIterator &it)
 Remove the custom data associated with the specified parameter. More...
 
StatusInt AddParameterDataItem (ParameterDataItemIterator *it, ParameterId pid, IPersistentParameterData const &pd)
 Add custom data to the specified parameter. More...
 
StatusInt UpdateParameterDataItem (ParameterDataItemIterator &it, IPersistentParameterData const &pd)
 Update the custom data associated with the specified parameter. More...
 
bool IsParameterDataItemDirty (ParameterDataItemIterator &it) const
 Is parameter data item dirty? More...
 
void SetParameterDataItemDirty (ParameterDataItemIterator &it, bool d)
 Set/clear parameter data item dirty status. More...
 
void ClrParameterChangedAll ()
 Clear dirty status of all parameters. More...
 
StatusInt AddMoniker (MonikerIterator *newIt, ParameterId id, Moniker const &moniker)
 Add a moniker to the specified parameter. More...
 
StatusInt UpdateMoniker (MonikerIterator &mIter, Moniker const &moniker)
 Update the moniker associated with the specified parameter. More...
 
MonikerIterator BeginMonikers () const
 Get iterator over monikers. More...
 
MonikerIterator FindMoniker (ParameterId id) const
 Find the moniker associated with the specified parameter. More...
 
StatusInt DropMoniker (MonikerIterator &it)
 Remove the specified moniker from the relation NOTE becomes invalid and is cleared. More...
 
MonikerTargetStatus GetMonikerStatus (MonikerIterator &it) const
 Is parameter data item dirty? More...
 
void SetMonikerStatus (MonikerIterator &it, MonikerTargetStatus status)
 Set/clear moniker target change status. More...
 
bool ClearMonikerStatusAll (MonikerTargetStatus statusToClear)
 Clear change status for all monikers. More...
 
void SetParameterChanged (ParameterQuery &pq)
 Set the parameter's status to dirty. More...
 
void ClrParameterChanged (ParameterQuery const &pq)
 Set the parameter's status to not dirty. More...
 
bool AnyChanges () const
 Query if any of the modification methods was called. More...
 
void RecordFirstDirectChange (UInt64 i)
 Record the first direct change. More...
 
UInt64 GetFirstDirectChange ()
 Get the first direct change. More...
 
void RemoveFirstDirectChange ()
 Remove the first direct change. More...
 
static IPropertyAccess * FindPropertyByName (ElementHandleCR ehandle, WChar const *nm, void *context)
 Find a relationship property by its name. More...
 
static void EnumerateProperties (WStringVector &strVec, ElementHandleCR ehandle)
 Enumerate the properties of relationship. More...
 
 RelationshipPropertyAccess (IHandler *, IGraphEvaluation *graph, UInt32 propId)
 

Variables

int dtime
 When relation was discovered during topological sort. Note: this does not tell you when the relation or its inputs were changed. More...
 
int ftime
 When relation was added to the topological sort. Note: this does not tell you when the relation or its inputs were changed. More...
 
int distanceFromRoot
 The number of relations and elements that were traversed from directly changed element to this relation. More...
 
bool isInternal
 Is relation an internally generated relation, such as the structural relationship between a cell and its components? More...
 
int cycleID
 Set by IGraphEvaluation::TopologicalSort. If this is non-zero, the relation is involved in a cycle. All other relations with the same cycleId are in the same cycle. More...
 
bool isInternal
 is element an internally generated element, such as a property? More...
 
int distanceFromRoot
 number of relations and elements that were traversed from directly changed element to this element More...
 
int cycleID
 Set by IGraphEvaluation::TopologicalSort. If this is non-zero, the relation is involved in a cycle. All other relations with the same cycleId are in the same cycle. More...
 
Token const * token1
 
Token const * token2
 
ExprErrorCode code
 
WString whatFailed
 
static ExprErrorDetails none
 A static member of ExprErrorDetails. More...
 
DgnModelRefP modelRef
 
UInt32 addGlobalOrigin:1
 
UInt32 is3d:1
 
UInt32 applyRefDisplayScale:1
 
int m_refCount
 
static int s_totalRefCount
 
TokenClsId clsId
 
UInt16 opCode
 
TokenClsId clsId
 
UInt16 opCode
 
static int s_totalRefCount
 
OpCode m_opCode
 
OpCode m_opCode
 
WChar * m_value
 
bool m_value
 
double m_value
 
Units m_units
 
Int32 m_value
 
Int64 m_value
 
DPoint3d m_value
 
DVec3d m_value
 
RotMatrix m_value
 
Transform m_value
 
OperandTokenVector * m_vec
 
FnCode m_fnCode
 
IExpression const * m_expression
 
Token * m_token
 
bool m_holdsRef
 
StatusInt m_error
 

Detailed Description

Relationship Manager is designed to handle networks of dependencies.

The Relationship Manager goes a step beyond MicroStation Dependency Manager. Relationship Manager ensures that a relationship's handler is notified when any of its inputs changes and allows the handler to change its outputs. The Relationship Manager guarantees that handlers are notified in dependency order.

For code samples, see Code Samples.

Relationships and Handlers

A relationship:

A relationship element can be any element type (and can have its own element handler). The only requirement is that it must have the relation XAttribute.

To implement a handler, write a C++ class that inherits from IHandler. Your class will implement methods such as EnterGraph and Reevaluate. Then add code to your MdlMain function to register an instance of your class by calling IManager::RegisterHandler. See RelationshipManagerCodeSamples. You will need a value from the XAttributeHandlerMajorIDs space to register your handler. See msdefs.h.

The Relationship Manager calls IHandler methods to build a dependency graph and to reevaluate relationships. Note that your implementation of IHandler is a singleton. The IHandler methods will get an instance of Relation to work on. The Relation class is a helper class that has convenience methods to access a relationship element's monikers and other data.

Monikers

Your relationship element will hold pointers to the elements that it inputs and outputs. A relationship uses a Moniker to point to each input and output element. The Relation::AddMoniker method is used to capture a pointer when the relationship is created. A Moniker is normally created by using a DgnPlatform::SnapPath or DgnPlatform::HitPath, as returned by functions such as mdlLocate_getCurrPath.

It is up to the IHandler to interpret a Moniker as an input or an output to a relationship. That is part of graph building.

Permanent Topological References

A Moniker uses a DgnPlatform::PersistentSnapPath. It can therefore capture a custom keypoint. Custom keypoints are used to capture "Permanent Topological References". This allows you to build a graph in terms of computed or logical entities, not necessarily elements. For example, a relationship might reference the "end" of a wall, where the reference is a permanent topological reference that is evaluated at runtime by the Handler of the wall element.

Dependency Graph

When the inputs to one relationship are the outputs of another relationship, we have a dependency graph, and we must fire the relationships in correct dependency order. The IGraphEvaluation class is responsible for orchestrating relationship updates. To do this, the graph manager first discovers and builds the dependency graph dynamically. It gets started by noting what elements have been directly changed and then examining their low-level back-pointers. It then calls the IHandler::EnterGraph method on each IHandler that it discovers. The IHandler::EnterGraph method is expected to tell the graph manager about its connections by calling IGraphEvaluation::AddInput and IGraphEvaluation::AddOutput. This where the handler uses its knowledge of which monikers represent inputs and which represent outputs. The handler thus helps the graph manager know what the dependencies are and to discover all relevant parts of the graph.

Graph Building and Partial Graphs

This section describes how a graph is built at run time.

The Relationship Manager works with individual IHandler to build the dependency graph in memory each time dependencies are fired. Briefly, when an ordinary element is changed, the Manager uses dependency backpointers to identify the affected Relations. (See "Dependency API" for more on backpointers.) The Manager pulls these Relations into the graph, along with the ordinary elements that the IHandler reports as its inputs and outputs. Then, the Manager uses backpointers to identify other Relations that are connected to the newly discovered outputs. As these downstream Relations are identified and pulled into the graph, new outputs are identified. This process continues until all potentially affected Relations are identified and given the chance to enter the graph.

A graph is built at runtime in reaction to specific element changes. The graph will only include affected Relations.

Suppose the following relationship elements and monikers exist.

(For each forward pointer, MicroStation maintains a backpointer.)

Suppose Element1 were changed. Relationship Manager would build a graph as follows:

(The graph-building algorithm is not actually recursive, but it amounts to the same thing.)

That produces this graph:

Graph-building is change-driven, and it visits and builds only the relevant parts. Suppose only Element4 were changed, then the graph would look like this:

Relation1 was left out of the graph, since none of its inputs changed. This pruning feature holds down the number of Relations that must be evaluated at runtime.

If Element3 were the change that triggers graph-building, then both Relation1 and Relation2 would be given the chance to enter the graph. Relation1's IHandler would then decide what to do about a direct change to one of its outputs. It could decide, for example, to reverse the direction of Relation1's action, if it has such a capability. In any case, if it installs Relation1 in the graph, it will get a chance to react to the Element3 change.

The graph can also change based on the particular logic of the IHandler. For example, a IHandler can decide to change the input/output directions of a relationship under some circumstances. In that case a totally different graph might be built. Or, a IHandler can modify the graph as it is being built, e.g., in order to handle cycles or cases where evaluation order would be ambiguous. See the IGraphEvaluation::RemoveRelationshipsAndSubstituteBlock method for an example.

You can use the freeware program dotty.exe to visualize a dependency graph. Call dot_writeGraph to create a .dot file from your MicroStation relatitionship elements.

Cycles

Only directed acyclic graphs have a unique evaluation order. An application can register a helper function to detect and remove cycles at the end of graph building. See IGraphManagerEventHandler::OnCyclesDetected and IGraphEvaluation::GetCycles

Graph Evaluation

After building the graph, the Relationship Manager reevaluates the Relations in dependency order. Specifically, the Relationship Manager calls the Reevaluate method on each IHandler.

For example, suppose Element1 were changed:

  \li Relation1 fires first, and it modifies its output, Element3.
  \li Relation2 is fired next. It sees Element3 as a change, and it modifies its output Element5.

If multiple changes occur, Relationship Manager will still only evaluate the graph once. For example, suppose Element1 and Element4 were changed.

As above,

Graph building pulls in all Relations that would be affected by upstream changes. Graph evaluation calls only the Relations that are actually affected.

For example, suppose Relation1 did not modify its output:

    \li Relation1 fires, and it does <em>not</em> modify its output.
    \li Relation2 is \em not fired, since its input did not change.

When only a partial graph is constructed, only the Relations in the graph are evaluated. Taking the example from the graph-building section, if only Element4 were changed, then only Relation2 would appear in the graph and only it would be reevaluated.

Checking

One the graph is evaluated, the Manager calls IHandler::IsSatisfied on all Relations that appear in the graph. If a downstream IHandler::Reevaluate method (incorrectly) changes an element that was declared to be the output of an upstream relationship, then this post-check will allow the upstream relationship to detect if the change and mark itself as violated if necessary. Or, in the example cited in the Graph Building section, if an output of a relationship were directly changed, the IsSatisfied method call would allow the relation to mark itself as violated if necessary.

Relationship data

Conceptually, a relationship element contains two kinds of data: Monikers and non-pointer properties.

Monikers

A relationship element stores its input and output element pointers using the Moniker helper class. A Moniker is-a DgnPlatform::PersistentSnapPath. The Relation class uses XAttributes to store Monikers.

The relationship manager knows about Monikers. This enables relationship manager to detect changes to a relationship's target elements. This in turn helps relationship manager to build and prune graphs.

A Moniker has a status flag indicating the changed status of the target element. When an element is changed or deleted and the change is written to the cache, the relationship manager checks the backpointers of that element to see if any relationship element depends on it. If so, relationship manager sets the status flag on the Moniker(s) in the relationship element that point to the changed element. The relationship element itself is then scheduled for reevaluation. Eventually, the relationship handler's Reevaluate method will be called. The handler can call Relation::GetMonikerStatus or ParameterQuery::IsChanged to check if a particular input or output was changed. The GraphEvaluation class automatically clears all parameter data item dirty flags and Moniker status flags after reevaluation is finished.

Parameter data items

The Relation package defines the concept of "parameter data item" to help you organize Relation data. The "parameter data item" concept uses XAttributes under the hood but is defined at a higher level. Conceptually, a Relation is a set of parameter data items. Each parameter data item is identified by a ParameterId (a 16-bit integer). A parameter data item has a Moniker and/or a piece of arbitrary data. The parameter data item concept allows you to:

To associate arbitrary data with a Moniker, you simply use the same ParameterId value when you add the Moniker and when you call AddParameterDataItem.

Non-pointer parameter data items are often used to store relationship properties.

In order to store arbitrary data in a parameter data item, you must wrap the data in a C++ class that implements the IPersistentParameterData interface. This interface defines methods to stream your data to and from the XAttribute that is used to hold it.

Relation allows you to set a "dirty" flag on a (non-Moniker) persistent data item. Typically, a Relation handler would call SetParameterDataItemDirty in a property set method. The handler would then call IsParameterDataItemDirty in the Reevaluate method.

The Relation package defines a number of helper methods and classes to support the parameter data item concept. The most convenient helper class is ParameterQuery.

See also
Code Samples

Macro Definition Documentation

#define UNITS_Base (   u)    (Units)(UNITS_Base_&(u))
#define UNITS_GetExp (   u)    (UNITS_ExpSq&(u)? 2: UNITS_ExpCu&(u)? 3: UNITS_Exp4&(u)? 4: 1)
#define UNITS_MkCu (   u)    (Units)(UNITS_Base_&(u) | UNITS_ExpCu)
#define UNITS_MkExp (   u,
  xm 
)    (Units)( (UNITS_Exp_&(xm)) | (UNITS_Base_&(u)) )
#define UNITS_MkExpMask (   x)    (2==(x)? UNITS_ExpSq: 3==(x)?UNITS_ExpCu: 4==(x)? UNITS_Exp4: 0)
#define UNITS_MkSq (   u)    (Units)(UNITS_Base_&(u) | UNITS_ExpSq)

Typedef Documentation

typedef UInt32 HandlerPrivateIdPart

Private part of a Relationship::IHandler's ID. This value can be anything.

typedef UInt32 HandlerPublicIdPart

Public part of a Relationship::IHandler's ID. Must be a value allocated from the XAttributeHandlerMajorIDs value space.

typedef RefCountedPtr<struct IGraphEvaluation> IGraphEvaluationPtr
typedef struct MstnPlatform::Relationship::IManager* IRelationshipManagerP
typedef struct MstnPlatform::Relationship::IManager& IRelationshipManagerR
typedef UInt16 ParameterId

A unique ID for a parameter in a set.

typedef int ProcessRelationshipsInModelCallback(IHandler *, Relation const &, void *)

Enumeration Type Documentation

enum DeepCopyOption

A list options of deep-copy.

Enumerator
DeepCopyOption_Off 
DeepCopyOption_On 
enum EvaluateMode

The reason why Evaluate has been called.

Enumerator
EVALUATE_MODE_Evaluate 

Compute the expression's value(s)

EVALUATE_MODE_DiscoverOutputs 

Discover the outputs of the expression – do no assignments! cause no side effects!

EVALUATE_MODE_CheckOutputEqualsExpression 

Check that the expression's output(s) equal the expression's value(s) – do no assignments! cause no side effects!

EVALUATE_MODE_CheckOperandTypes 

Check the types of the operands – do no assignments! cause no side effects!

enum ExprErrorCode

Expression parsing and evaluate Error codes.

Enumerator
EXPRESSION_ERROR_None 
EXPRESSION_ERROR_UnsupportedOperation 
EXPRESSION_ERROR_UnsupportedDataType 
EXPRESSION_ERROR_InvalidCast 
EXPRESSION_ERROR_InternalErrorMissingOperand 
EXPRESSION_ERROR_UnresolvedGlobalVariableName 
EXPRESSION_ERROR_NotAnLvalue 
EXPRESSION_ERROR_ERange 
EXPRESSION_ERROR_MissingDictionary 
EXPRESSION_ERROR_StorageError 
EXPRESSION_ERROR_DoesNotSupportProperties 
EXPRESSION_ERROR_UnresolvedPropertyName 
EXPRESSION_ERROR_NotSatisfied 
EXPRESSION_ERROR_Syntax 
EXPRESSION_ERROR_UnknownFunction 
EXPRESSION_ERROR_BadUnits 
EXPRESSION_ERROR_ElementNotFound 
EXPRESSION_ERROR_HandlerNotFound 
EXPRESSION_ERROR_BadVersion 
EXPRESSION_ERROR_Unavailable 
enum FnCode

Defines function types.

Enumerator
FN_PointBetween 
FN_PointProjectToPlane 
FN_PointAddVector 
FN_PointSubtract 
FN_PointProjectToLine 
FN_VectorDirection 
FN_Point2d 
FN_VectorMagnitude 
FN_OrientationGetRotationAxis 
FN_OrientationGetRotationAngle 
FN_OrientationMultiply 
FN_OrientationGetAxis 
FN_OrientationXY 
FN_Point3d 
FN_Vector3d 
FN_VectorDotProduct 
FN_VectorCrossProduct 
FN_VectorAdd 
FN_VectorSubtract 
FN_VectorScale 
FN_Vector2d 
FN_OrientationRotate 
FN_OrientationXYZ 
FN_OrientationZ 
FN_OrientationXZ 
FN_VectorRotate 
FN_PointDistance 
FN_LCS 
FN_DistanceAlong 
FN_VectorNormalize 
FN_GetActiveModel 
FN_DictionaryFind 
FN_MasterUnits 
FN_SubUnits 
FN_UORs 
enum GraphBuildingOptions

Options to control the graph-building algorithm.

Enumerator
GBOPTIONS_None 
GBOPTIONS_DeferEnterGraph 

Use a more scalable algorithm for graph-building.

This is recommended for large graphs, but only works when all relationships are persistent.

enum MonikerTargetStatus

The status of a parameter in a relationship.

Enumerator
MONIKER_TARGET_STATUS_Clear 

The target element needs no attention: i.e., it has not changed or it has been processed by the relationship.

MONIKER_TARGET_STATUS_Changed 

The target element was changed (or created)

MONIKER_TARGET_STATUS_Deleted 

The target element was deleted.

MONIKER_TARGET_STATUS_Unresolved 

A far reference cannot be resolved.

MONIKER_TARGET_STATUS_Resolved 

A far reference has been resolved.

MONIKER_TARGET_STATUS_OutOfSpec 

The state of the target element has not been checked by the relationship. This is the initial state for all new moniker parameters.

MONIKER_TARGET_STATUS_NeedsRecompute 

The target element has changed, is out-of-spec, or was offline and may have been changed.

MONIKER_TARGET_STATUS_Unavailable 

The target is unavailable, either because it was deleted or is currently unresolved.

enum OpCode

Defines the type of binary operator.

Enumerator
OP_Ldexp 
OP_Atan2 
OP_Pow 
OP_Add 
OP_Subtract 
OP_Multiply 
OP_Divide 
OP_Mod 
OP_LE 
OP_GE 
OP_LT 
OP_GT 
OP_EQ 
OP_NE 
OP_Xor 
OP_BitAnd 
OP_BitOr 
OP_Shl 
OP_Shr 
enum OpCode

Defines the type of unary operator.

Enumerator
OP_Cos 
OP_Acos 
OP_Sin 
OP_Asin 
OP_Atan 
OP_Tan 
OP_Cosh 
OP_Tanh 
OP_Sinh 
OP_Exp 
OP_Log 
OP_Log10 
OP_Sqrt 
OP_Negate 
OP_NOT 
OP_Comp 
enum ParameterDataItemFlags
Enumerator
PARAMETER_DATAITEM_FLAGS_Dirty 
enum PriorToLoading

A flag used to determine if prior to loading.

Enumerator
PriorToLoadingFlag 
enum RelationStatus

The up-to-date status of a relationship.

Enumerator
RELATION_STATUS_UpToDate 

The relationship is up to date.

RELATION_STATUS_Pending 

One or more inputs has changed, and the relationship is scheduled for reevaluation.

RELATION_STATUS_Violated 

One or more inputs has changed, and the relationship could not be reevaluated.

RELATION_STATUS_Deferred 

One or more inputs has changed, and the relationship will be reevaluated later.

RELATION_STATUS_Incomplete 

One or more inputs is unavailable (usually set only in conjunction with Violated)

RELATION_STATUS_Disabled 

The relationship is disabled. It will not be reevaluated but always deferred when affected by changes.

RELATION_STATUS_Circular 

The relationship is involved in a cycle.

RELATION_STATUS_New 

The relationship is new. This will be set only once, when the relationship is created.

RELATION_STATUS_Alias 

The relationship contains no information of its own. It is just a reference to some other relation. Do not call EnterGraph or Reevaluate.

RELATION_STATUS_NotSatisfied 

The relationship is not satisfied and needs attention.

enum SigType

Defines signal types.

Enumerator
SIG_PT 
SIG_DBL 
SIG_PT_PT 
SIG_PT_VEC 
SIG_VEC 
SIG_VEC_VEC 
SIG_VEC_DBL 
SIG_ROT 
SIG_ROT_ROT 
SIG_ROT_DBL 
SIG_DBL_DBL 
SIG_ROT_PT 
SIG_PT_LCS 
SIG_ELM_STR 
enum State

Define the states of graph processing.

Enumerator
STATE_Other 
STATE_BuildingGraph 
STATE_Reevaluating 
STATE_PostReevaluate 
enum TokenClsId

Token factory classIds.

Enumerator
TOKENCLSID__Temporary__ 
TOKENCLSID_StringValue 
TOKENCLSID_DoubleValue 
TOKENCLSID_PointValue 
TOKENCLSID_BltFns 
TOKENCLSID_StdAssignOp 
TOKENCLSID_StdDotOp 
TOKENCLSID_StdCommaOp 
TOKENCLSID_GvValue 
TOKENCLSID_OrientationValue 
TOKENCLSID_StdBinOp 
TOKENCLSID_StdUnOp 
TOKENCLSID_VectorValue 
TOKENCLSID_LCSValue 
TOKENCLSID_ArrayValue 
TOKENCLSID_StdConditionalOp 
TOKENCLSID_BooleanValue 
TOKENCLSID_StdLogicalOp 
TOKENCLSID_StdIndexOp 
TOKENCLSID_IntValue 
TOKENCLSID_Int64Value 
TOKENCLSID_FirstCustomClass 
enum Units

Defines the types of units.

Enumerator
UNITS_None 
UNITS_Point 
UNITS_Distance 
UNITS_Angle 
UNITS_AngleDirection 
UNITS_DirectionVector 
UNITS_Other 
UNITS_Na 
UNITS_Radians 
UNITS_Boolean 
UNITS_Base_ 
UNITS_Exp_ 
UNITS_ExpSq 
UNITS_ExpCu 
UNITS_Exp4 

Function Documentation

virtual ExprErrorDetails _DoOperation ( TokenOperandStack ) const
protectedvirtual
void AddInput ( Relation const &  rel,
ElementRefP  elRef 
)

Declare that elRef is an input to rel.

Parameters
[in]relRelationship to modify
[in]elRefElement to add to relationship's input list
void AddInput ( Relation const &  ,
Moniker  
)

Add the element identified by the specified moniker as an input to the relation.

UInt16 AddItem ( OperandToken token)

Adds an item into current array.

Parameters
[in]tokenAn OperandToken to add
Returns
The position of added
See also
RemoveItem
StatusInt AddMoniker ( MonikerIterator newIt,
ParameterId  id,
Moniker const &  moniker 
)

Add a moniker to the specified parameter.

Warning
This may invalidate outstanding iterators
Parameters
[out]newItoptional: iterator pointing to new moniker
[in]idThe specified parameter Id
[in]monikerThe moniker to add
Returns
SUCCESS if added, otherwise ERROR
See also
DropMoniker
void AddOutput ( Relation const &  rel,
ElementRefP  elRef 
)

Declare that elRef is an output of rel.

Parameters
[in]relRelationship to modify
[in]elRefElement to add to relationship's output list
void AddOutput ( Relation const &  ,
Moniker  
)

Add the element identified by the specified moniker as an output of the relation.

StatusInt AddParameterDataItem ( ParameterDataItemIterator it,
ParameterId  pid,
IPersistentParameterData const &  pd 
)

Add custom data to the specified parameter.

Parameters
[out]itoptional: An iterator pointing to the new parameter
[in]pidThe unique ID that the caller wishes to assign to the new parameter
[in]pdThe custom data to associate with the parameter
Warning
This will invalidate all outstanding iterators
It's up to the caller to check for the uniqueness of pid.
Returns
SUCCESS if added, otherwise ERROR
See also
DropParameterDataItem
void AddRef ( )

Add one to ref count.

See also
Release
void AddRef ( )

Add one to ref count.

See also
Release
void AddToken ( Token t)

Add a token to the expression during expression creation.

Remarks
NOTE: Tokens must be added in RPN order! The Evaluate method will process tokens in the order in which they were added. Operands are pushed onto the evaluation stack, and operators are given the stack to process. Normally an operator pops its operands from the stack and pushes its result onto the stack. Therefore, normally, tokens must precede operators, operand, ..., operator, and higher precedence operators must precede lower precedence operators.
This method is called by a parser to build up an expression.
Parameters
[in]tThe token to add
bool AnyChanges ( ) const

Query if any of the modification methods was called.

Returns
true if changed, otherwise false
virtual OperandToken* Apply1 ( ExprErrorDetails ,
OperandToken const *   
) const
virtual

Applies the relative functions with one operand.

virtual OperandToken* Apply2 ( ExprErrorDetails ,
OperandToken const *  ,
OperandToken const *   
) const
virtual

Applies the relative functions with two operands.

OperandToken* ApplyBinOp ( ExprErrorDetails error,
BinOpCode  opCode,
OperandToken const *  operand 
) const

Executes a binary operator with the given binary type and operand.

Parameters
[out]errorA pointer to an ExprErrorDetails used to store the error information if there is any problem
[in]opCodeA binary operator type to apply
[in]operandAn operand used in current operation
Returns
A pointer to an OperandToken stored the executed result
virtual OperandToken* Applyn ( ExprErrorDetails ,
TokenOperandStack  
) const
virtual

Applies the relative functions with more than two operands.

ExprErrorDetails ApplyUnits ( Units  unit,
DgnModelRefP  modelRef,
char const *  unitsStr 
)

Applies units.

Parameters
[in]unitAn Units to apply
[in]modelRefA pointer to a DgnModelRef
[in]unitsStrAn units string
Returns
An ExprErrorDetails if there is any error
OperandToken* ApplyUnOp ( ExprErrorDetails error,
UnOpCode  opCode 
) const

Executes an unary operator with the given binary type and operand.

Parameters
[out]errorA pointer to an ExprErrorDetails used to store the error information if there is any problem
[in]opCodeAn unary operator type to apply
Returns
A pointer to an OperandToken stored the executed result
ArrayValue ( )
explicit

Generates an ArrayValue with a default value(NULL)

AssignOp ( IExpression const *  x)
explicit
MonikerIterator BeginMonikers ( ) const

Get iterator over monikers.

Returns
A MonikerIterator
ParameterDataItemIterator BeginParameterDataItems ( ) const

Get an iterator over custom parameter data items.

Returns
A ParameterDataItemIterator
BinOpCode ( TokenClsId  c,
UInt16  o 
)
BltFns ( IExpression const *  )
explicit

Generates a BltFns with an IExpression.

BltFns ( IExpression const *  ,
FnCode   
)
explicit

Generates a BltFns with an IExpression and FnCode.

BooleanValue ( )
explicit

Generates a Boolean value with a default value(false)

BooleanValue ( bool  b)
explicit

Generates a Boolean value with a given value.

StatusInt CheckPropertyType ( IGraphEvaluation graph,
Relation const &  rel,
UInt32  propId,
OperandToken const &  newValue 
)

Check the type of the proposed new value for a property.

Parameters
[in]graphOptional: If the relation is part of a graph, this is the graph
[in]relThe relationship to query
[in]propIdThe property to access
[in]newValueThe proposed new value
Returns
SUCCESS if the types are compatible
StatusInt CheckType ( OperandToken const &  newValue,
ElementHandleCR   
)

Check if the the property's value could by updated using the specified new value.

Parameters
[in]newValueThe new value for the property
void Clear ( )

Cause the moniker to forget its current target and free its internal resources.

bool ClearMonikerStatusAll ( MonikerTargetStatus  statusToClear)

Clear change status for all monikers.

Parameters
[in]statusToClearMask identify the status flags to be cleared (others are preserved)
Returns
true if any moniker status needed to be cleared
void ClearTemporaryElements ( )

Free all elements allocated from this TempFile.

void ClearTempPropRefs ( )

Same as ClearTemporaryElements.

void ClrParameterChanged ( ParameterQuery const &  pq)

Set the parameter's status to not dirty.

If the parameter has a Moniker, its status is set to MONIKER_TARGET_STATUS_Clear

Parameters
[in]pqA ParameterQuery in which the status will not be changed
void ClrParameterChangedAll ( )

Clear dirty status of all parameters.

void ClrStatusFlag ( RelationStatus  flagToTurnOff)

Clear the specified status flags.

Parameters
[in]flagToTurnOffA RelationStatus
CommaOp ( IExpression const *  )
explicit

Generates a comma operator.

ConditionalOp ( IExpression const *  ,
UInt16  childCount,
bool  isBookend 
)
explicit

Generates a conditional operator.

OperatorToken* Create ( IExpression x,
char const *  identifier 
)

Create the operator identified during parsing of an expression.

Parameters
[in]xThe expression of which operator is to be a part
[in]identifierThe name of the operator
Returns
new operator
Token* Create ( IExpression const *  )

Create a new Token with an IExpression.

StatusInt CreateTemporaryRelationshipElement ( EditElementHandleR  eh,
HandlerPublicIdPart  amid,
HandlerPrivateIdPart  actid 
)

Create a relation that will exist only as long as the IGraphEvaluation object exists.

While the IGraphEvaluation object exists, this relation can be used like any other relation: you can add it to a graph, add parameter data items or other XAttributes to it, set/clear its changed status, etc. This method is useful when you want to create a temporary relation to resolve a cycle by standing in for the relations in the cycle.

Remarks
Since the relation element is only temporary, you should not save its DgnPlatform::ElementId or attempt to create a moniker or other permanent association that points to it.
Parameters
[out]ehThe element created
[in]amidThe new relation's major public id
[in]actidThe new relation's minor public id
See also
IGraphManagerEventHandler::RemoveRelationshipsAndSubstituteBlock
Remarks
See Adding Monikers To Temporary Relation
This calls CreateTemporaryElement.
The lifetime of this element is limited to the lifetime of this graph.
void DeclareDeferredChanges ( ElementRefP  relRef,
bool  allMonikers 
)

This function scans the specified relationship and detects all parameters with a status of MONIKER_TARGET_STATUS_NeedsRecompute.

It then declares these parameters as directly changed, thus scheduling the relationship for reevaluation on the next call to Reevaluate.

Remarks
This function is useful for reevaluating a deferred relationship.
If no parameter is marked as MONIKER_TARGET_STATUS_NeedsRecompute, then the relationship itself it declared as directly changed.
Parameters
[in]relRefThe relationship to process
[in]allMonikersIf true, mark all parameters with monikers as changed; else declare only those parameters already marked as changed
void DeclareDirectChange ( ElementRefP  ref)

Declare that the specified element was directly changed (even if it wasn't).

This schedules the affected relationships for reevaluation and marks their references to this element as MONIKER_TARGET_STATUS_Changed.

Parameters
[in]refThe element that changed
void DeclareDiscovery ( ElementRefP  ref)

Declare that the specified element was discovered.

On the next call to Reevaluate, this element should be considered to have been directly changed.

Remarks
The caller should create a Moniker pointing to the newly discovered element before calling this function.
Parameters
[in]refThe element to discover
StatusInt Delete ( Relation rel)

Delete a relationship by deleting the relationship element.

Parameters
[in]relThe relation to delete
See also
IGraphManagerEventHandler::OnRelationshipDeleted
StatusInt DeleteRelationship ( Relation rel)

Delete a relationship, just delete the relationship element.

Parameters
[in]relThe relationship to remove
Returns
SUCCESS if the input relationship is deleted, otherwise ERROR
bool DependsOnElementRef ( ElementRefP  target) const

Does the moniker depend on this ElementRefP? If host and target are in same model and if target is not a shared cell instance, then this is the same as EvaluateElement().GetElementRef() == target.

For non-simple paths, this function will recognize the moniker's dependence on the reference attachment element, parts of the shared cell instance path, etc.

Parameters
[in]targetA pointer to an ElementRef
Returns
true if the moniker depends on this ElementRefP, otherwise false
DerivedPropertyBase ( )
explicit

Generate an object of DerivedPropertyBase.

void DisableReevaluation ( )

Disable reevaluation. This is useful when bulk loading relationships.

ExprErrorDetails DoOperation ( TokenOperandStack ) const

Execute this operation.

void Bentley::MstnPlatform::Relationship::dot_writeGraph ( char const *  fileName,
IGraphEvaluation &  graph 
)

Write a graph to ATT Graphviz "dot" file format.

DotOp ( IExpression const *  )
explicit

Generates a dot operator.

DoubleValue ( )
explicit

Generates a DoubleValue with a default one.

DoubleValue ( double  d,
Units   
)
explicit

Generates a double value with a couple given value.

StatusInt DropMoniker ( MonikerIterator it)

Remove the specified moniker from the relation NOTE becomes invalid and is cleared.

Parameters
[in]itThe moniker iterator to drop
Returns
SUCCESS if dropped the specified moniker, otherwise ERROR
See also
AddMoniker
StatusInt DropParameterDataItem ( ParameterDataItemIterator it)

Remove the custom data associated with the specified parameter.

Warning
This will invalidate all outstanding iterators
Parameters
[in]itA reference to a ParameterDataItemIterator to be dropped
Returns
SUCCESS if dropped, otherwise ERROR
See also
AddParameterDataItem
void Dump ( )

Dump current information.

ElementProperty ( ElementHandleCR  targetElement,
WChar const *  propName,
ElementRefP  tempPropRef,
OperandToken const *  base 
)
explicit

Generate an object of ElementProperty with parameters.

ElementProperty ( IPropertyAccess )
explicit

Generate an object of ElementProperty with an IPropertyAccess.

ElementRefValue ( IExpression const *  ,
ElementHandleCR   
)
explicit

Generates an ElementRefValue with ElementHandle.

void EnableReevaluation ( )

Re-enable reevaluation. This is useful when finished with bulk loading relationships.

void EnableRelationship ( ElementRefP  ref,
bool  enable 
)

This function marks the relationship as enabled or disabled.

Remarks
A disabled relationship is never reevaluated but always deferred when affected by changes.
Parameters
[in]refThe element to be enabled
[in]enableA bool value to use
virtual void EndTiming ( )
pure virtual
void EnrollDependentRelations ( IGraphEvaluation graph,
ElementHandleCR  eh 
)

Enroll dependent relations.

Parameters
[in]graphAn IGraphEvaluation to enroll
[in]ehAn ElementHandleCR to use
void EnrollElement ( ElementRefP  elRef,
Relation const &  rel 
)

Tell the graph about a potentially new element.

Parameters
[in]elRefPotentially new element
[in]relThe relationship that uses the element
void EnrollRelationship ( Relation const &  rel,
ElementRefP  elRef 
)

Tell the graph about a potentially new relationship.

Parameters
[in]relPotentially new relationship
[in]elRefElement that is used by the relationship
bool EnteredGraph ( IGraphEvaluation ,
Relation const &  rel 
)

Callback invoked after the graph has been built but before the schedule has been computed.

This method may modify the relationship's input and output edges, e.g., in order to choose a direction.

Parameters
[in]relThe relation
Remarks
this callback is invoked only if the relationship returned true from its EnterGraph callback.
See also
EnterGraph
Returns
true if any changes were made.
bool EnterGraph ( IGraphEvaluation ,
Relation const &  rel 
)

Callback invoked when the relationship element has been put into the relationship graph.

This method should create the relationship's input and output edges.

Parameters
[in]relThe relation
See also
IGraphEvaluation::AddOutput IGraphEvaluation::AddInput
Returns
true if relationship would like an EnteredGraph callback later
static void EnumerateProperties ( WStringVector strVec,
ElementHandleCR  ehandle 
)
static

Enumerate the properties of relationship.

Parameters
[in]strVecA string vector used to store the enumerated properties
[in]ehandleAn ElementHandleCR used to get the properties
Returns
An IPropertyAccess
void EnumerateProperties ( WStringVector strVec,
ElementHandleCR   
)

Query the properties supported by the specified element.

Parameters
[in]strVecA string vector to receive WString's
void EnumerateProperties ( WStringVector strVec,
Relation const &  rel 
)

The relationship should return the properties that it supports.

Parameters
[in]strVecVector to receive WString's
[in]relThe relationship to query
bool EqualsLocalElement ( DgnPlatform::ElementId  eId) const

Convenience method to see if current element is equal with the local one.

Parameters
[in]eIdThe Id of the element to compare with
Returns
true if they are equal, otherwise false
ExprErrorDetails Evaluate ( OperandToken **  result = 0) const

Evaluate the expression.

Parameters
[out]resultoptional: The resulting value of the expression. Set only if Evaluate does not return an error code.
Returns
An error code if evaluation fails.
Remarks
Note: caller must call Release on result if non-NULL!
See also
GetEvaluateMode
GetLastError
DgnPlatform::ElementHandle EvaluateElement ( bool  wantFirst = true)

Try to get a handle on the referenced element.

See Moniker for reasons why this might fail.

Parameters
[in]wantFirstIf true, get the first target of the snap or display path. If false, get the second of a two-target snap path or NULL if there is only one target.
Returns
An ElementHandle in which the element has been evaluated
DgnPlatform::ElementHandle EvaluateElement ( bool  wantFirst = true) const

Get (first) target element.

Parameters
[in]wantFirstIf true, get the first target of the snap or display path. If false, get the second of a two-target snap path or NULL if there is only one target.
Returns
An ElementHandle
See also
GetPaths to retrieve both targets of an intersection snap
StatusInt EvaluatePoint ( DPoint3d pt)

Get the point identified by the snap.

Parameters
[out]ptThe point (transformed into the coordinate system of the home model aka "world coordinates")
Returns
SUCCESS if evaluated, otherwise ERROR
DgnPlatform::ElementHandle EvaluateReferenceAttachment ( bool  wantFirst = true) const

Get the reference attachment used to access the (first) target element.

Parameters
[in]wantFirstIf true, get the first target of the snap or display path. If false, get the second of a two-target snap path or NULL if there is only one target.
Returns
An ElementHandle
See also
GetPaths to retrieve both targets of an intersection snap
ExprErrorDetails ( Token const *  x,
ExprErrorCode  e 
)

Constructor with parameters.

ExprErrorDetails ( Token const *  x,
ExprErrorCode  e,
WChar const *  whatFailed,
Token const *  x2 
)

Constructor with parameters.

ExprErrorDetails ( Token const *  x,
ExprErrorCode  e,
char const *  whatFailed,
Token const *  x2 
)

Constructor with parameters.

ExprErrorDetails ( Token const *  x,
ExprErrorCode  e,
BinOpCode  op,
Token const *  rhs 
)

Constructor with parameters.

ExprErrorDetails ( Token const *  x,
ExprErrorCode  e,
UnOpCode  op 
)

Constructor with parameters.

ExprErrorDetails ( )

Constructor.

ExprErrorDetails ( ExprErrorDetails const &  e2)

Generate a new ExprErrorDetails from another one.

Parameters
[in]e2The given ExprErrorDetails to copy
Returns
A new ExprErrorDetails
MonikerIterator FindMoniker ( ParameterId  id) const

Find the moniker associated with the specified parameter.

Parameters
[in]idThe parameter Id to search
Returns
A MonikerIterator associated with the specified parameter
ParameterDataItemIterator FindParameterDataItem ( ParameterId  pid) const

Find the custom data associated with the specified parameter.

Parameters
[in]pidA ParameterId to search
Returns
A ParameterDataItemIterator
static IPropertyAccess* FindPropertyByName ( ElementHandleCR  ehandle,
WChar const *  nm,
void *  context 
)
static

Find a relationship property by its name.

Parameters
[in]ehandleAn ElementHandleCR used to search
[in]nmA property name
[in]contextA void pointer
Returns
An IPropertyAccess
IPropertyAccess* FindPropertyByName ( ElementHandleCR  ehandle,
WChar const *  nm,
void *  context 
)

Look up the specified property.

Parameters
[in]ehandleThe element to query for the property
[in]nmThe name of the property to find
[in]contextA void pointer
StatusInt FindPropertyByName ( UInt32 propId,
IGraphEvaluation graph,
Relation const &  rel,
WChar const *  nm 
)

Ask the relationship to look up the specified property.

Parameters
[out]propIdOptional: the ID of the property if successful
[in]graphOptional: the graph of which this relationship is a part, or NULL if not part of a graph
[in]relThe relationship to query
[in]nmThe name of the property to find
Returns
non-zero error status code if the property is not defined or not supported
Remarks
The propId value returned by this function will be passed to Relation::GetPropertyValue.
See also
Relation::GetPropertyValue
WString Fmt ( ) const

Formats the error information.

Returns
A formatted string
WString Fmt ( ) const

Format current object.

Returns
A formatted string
FmtArgs ( DgnModelRefP  m)

Generate a new FmtArgs from a DgnModelRefP.

WString Bentley::MstnPlatform::Relationship::fmtComponentProperties ( ElementHandleCR  ehandle)

Format the component properties in GlobalVariableDictionary.

Parameters
[in]ehandleThe ElementHandle to use
Returns
The formatted string
WString Bentley::MstnPlatform::Relationship::fmtElementProperties ( ElementHandleCR  ehandle)

Format the element properties.

Parameters
[in]ehandleThe ElementHandle to use
Returns
The formatted string
WString Bentley::MstnPlatform::Relationship::fmtElementRef ( ElementRefP  ref)

Format element.

Parameters
[in]refThe ElementRef to format
Returns
The formatted string
WString Bentley::MstnPlatform::Relationship::fmtElementRef3 ( ElementRefP  ref)

Format element without showing internal name.

Parameters
[in]refThe ElementRef to format
Returns
The formatted string
WString Bentley::MstnPlatform::Relationship::fmtElementRef4 ( ElementRefP  ref)

Format element with showing internal name.

Parameters
[in]refThe ElementRef to format
Returns
The formatted string
WString Bentley::MstnPlatform::Relationship::fmtRelationshipStatus ( Relation const &  rel)

Format the status of relationship.

Parameters
[in]relThe Relation to use
Returns
The formatted string
WString FmtType ( ) const

Get the short type name of this Token.

Returns
The short type name of this Token
WString FmtUnits ( ) const

Formats current units.

Returns
A formated string
WString FmtValue ( FmtArgs const &  ) const

Format current members to a binary operator code.

WString FmtValue ( FmtArgs const &  ) const

Format current members to an unary operator code.

WString FmtValue ( FmtArgs const &  ) const

Format to a Token string.

OperandToken const* GetBase ( ) const

Get current operand token.

Returns
A const pointer to an OperandToken
TokenClsId GetClsId ( ) const

Get current TokenClsId.

Returns
Current TokenClsId
UInt16 GetCount ( ) const

Gets the size of current array.

Returns
The size value
RefRefPairVectorVector const& GetCycles ( ) const

Get the list of all cycles in the graph.

If the returned vector is empty, the graph does not contain cycles. A graph that contains cycles has no unique reevaluation order.

A cycle is a list of ElementRefP pairs. In each pair, the first ElementRefP identifies a relationship element and the second identifies an output of that relationship. Each output element is also an input of the relationship in the previous pair in the list. The input of the first relationship in the list is the output of the last relationship in the list. For example, the following graph:

Produces the following cycle:

   {REL1,el1}
   {REL2,el2}
   {REL3,el3}

A graph can contain many cycles. GetCycles returns a list of all cycles found.

See also
IGraphManagerEventHandler::OnCyclesDetected
Code Samples
StatusInt GetData ( IPersistentParameterData pd)

Gets the additional data for this parameter.

Parameters
[out]pdAn IPersistentParameterData used to store the additional data
Returns
SUCCESS if got data, otherwise ERROR
ParameterDataItemIterator& GetDataIterator ( )

GetS a reference to the additional data for this parameter.

Use this method to get the iterator you will need to call Relation methods that apply to parameter data items.

Returns
Current ParameterDataItemIterator
DeepCopyOption GetDeepCopyOption ( ) const

Check if root should be deep-copied when the relation that owns this moniker is copied.

Returns
The type of deep-copying
See also
SetDeepCopyOption
WString GetDesc ( IHandler handler,
Relation const &  rec 
)

Get description of the specified relationship.

Parameters
[in]handlerA pointer to an IHandler to use
[in]recThe relationship to get description
Returns
The description of the input relationship
WString GetDescription ( ) const

Gets the description of current iterator.

Returns
The description string
WString GetDescription ( ) const

Get a brief description of the moniker.

Returns
A brief description string
WString GetDescription ( Relation const &  rel)

Provide a brief description of the relationship.

Description is used in path info strings, among other places

Parameters
[in]relThe relationship to query
Returns
A brief description of the relationship
GlobalVariableDictionaryChain& GetDictionaryChain ( ) const

Get the global variable dictionary chain to be used to resolve identifiers in the expression.

Returns
GV dictionary
StatusInt GetElementConnections ( ElementRefVector inputTo,
ElementRefVector outputFrom,
ElementRefP  elRef 
)

Query the relations to which the specified element is connected.

Parameters
[in]inputToOptional: relationships to which element is an input
[in]outputFromOptional: relationship(s) from which element is an output
[in]elRefElement to look up
Returns
Non-zero if element is not in the graph
ElementNodeInfo GetElementNodeInfo ( ElementRefP  )

Query information about the specified element as a node in the graph.

Returns
An ElementNodeInfo
ElementPropertyMap const* GetElementProperties ( ) const

Query the property references used by the expression.

Returns
std::map<ElementRefP, ElementProperty*>
ElementProperty* GetElementProperty ( ElementHandleCR  targetElement,
WChar const *  propName,
OperandToken const *  base 
) const

Ask the expression for the property ref token that should be used to access the specified property of the specified element.

Remarks
All references to the same property of the same target element result in the same property ref token.
If the targetElement does not support properties, the return value will be NULL.
Even if the return value is not NULL, that does not guarantee that the property exists.
Parameters
[in]targetElementThe element containing the property.
[in]propNameThe name of the property on the target element
[in]baseThe operand whose property is being queried
Returns
A property ref token that may be used to access the specified property, or NULL if the target element does not support properties.
EditElementHandleR GetElemHandle ( ) const

Get the element handle of the relationship element itself.

Returns
A reference to an EditElementHandle
EvaluateMode GetEvaluateMode ( ) const

Query the purpose of evaluation.

Remarks
Normally, Evaluate is called to compute the result of the expression. Evaluate may be called for different reasons, however. The caller's purpose is indicated by the evaluate mode.
An operator that has side-effects should check the mode before doing anything that would modify an operand or a global variable or property.
Returns
Evaluation mode
IExpression const* GetExpression ( ) const

Get current expression.

Returns
A const pointer to an IExpression
IExpression const* GetExpression ( ) const

Gets expression.

Returns
A const pointer to an IExpression
See also
SetExpression
UInt64 GetFirstDirectChange ( )

Get the first direct change.

Returns
An UInt64 value
See also
RecordFirstDirectChange,RecordFirstDirectChange
IGraphEvaluation* GetGraph ( ) const

Get current graph.

Returns
A const pointer to an IGraphEvaluation
IGraphEvaluation* GetGraphEvaluation ( ) const

Query the graph evaluation context in which Evaluate is called.

Returns
Graph if any
DgnPlatform::ElementHandle GetGvElement ( ) const

Gets GV element.

Returns
An ElementHandle
WChar const* GetGvName ( ) const

Gets current GV name.

Returns
Current GV name
Relation* GetGvRelation ( ) const

Gets GV relation.

Returns
A pointer to a Relation
IHandler* GetHandler ( Relation const &  rel)

Find the relationship handler for the specified relationship.

Parameters
[in]relThe relationship to find
Returns
handler registered for the relation or a pointer to a NulHandler if the real handler is not available.
HandlerPrivateIdPart GetHandlerPrivateIdPart ( ) const

Query relationship handler's private value Note: handler private key part is meaningful only to the relationship handler.

Returns
A HandlerPrivateIdPart
See also
SetHandlerPrivateIdPart
HandlerPublicIdPart GetHandlerPublicIdPart ( ) const

Query relationship's relationship handler.

Returns
A HandlerPublicIdPart
See also
SetHandlerPublicIdPart
DgnModelRefP GetHomeModelRefP ( ) const

Query the model of the reference holder.

Returns
A pointer to a DgnModelRef
See also
SetHomeModelRef
ParameterId GetId ( ) const

Gets current parameter Id to query.

Returns
Current ParameterId
OperandToken* GetItem ( UInt16  i) const

Gets item at a given index.

Parameters
[in]iThe position of the item to get at
Returns
The item at the given index
OperandToken* GetItemByIndex ( ExprErrorDetails error,
OperandToken const *  indexValue 
) const

Gets item by a given index.

Parameters
[out]errorA pointer to an ExprErrorDetails used to store the error information if there is any problem
[in]indexValueThe given index
Returns
A pointer to an OperandToken
ExprErrorDetails const& GetLastError ( ) const

Get error resulting from most recent evaluation.

Returns
Error details if any
See also
Evaluate
IManager* Bentley::MstnPlatform::Relationship::GetManager ( )

Return a pointer to the one and only relationship manager.

DgnModelRefP GetModelRef ( ) const

Get the model where the expression itself is stored.

Returns
a model
Moniker GetMoniker ( ) const

Gets a Moniker.

Returns
A Moniker
Moniker GetMoniker ( )

Query this parameter's element reference.

Returns
Current Moniker
MonikerIterator& GetMonikerIterator ( )

Query this parameter's element reference.

Use this method when you want to update the element reference in place. Use this method to get the iterator you will need to call Relation methods that apply to monikers. See Relation for methods to add/delete monikers.

Returns
A reference to current MonikerIterator
MonikerTargetStatus GetMonikerStatus ( MonikerIterator it) const

Is parameter data item dirty?

Parameters
[in]itThe moniker iterator to get the status from
Returns
A MonikerTargetStatus
See also
SetMonikerStatus
static IParserOperatorFactory* GetParserOperatorFactory ( )
static

Gets a static IParserOperatorFactory.

static IParserOperatorFactory* GetParserOperatorFactory ( )
static

Gets a static IParserOperatorFactory.

StatusInt GetPaths ( DisplayPathPtr path1,
DisplayPathPtr path2 
)

Get one or both target elements.

Parameters
[out]path1A reference to a DisplayPathPtr
[out]path2A reference to a DisplayPathPtr
Returns
SUCCESS or ERROR
StatusInt GetPersistentParameter ( IPersistentParameterData data) const

Get the custom parameter data associated with the current parameter.

Parameters
[out]dataAn IPersistentParameterData used to store the persistent parameters
Returns
SUCCESS if got data, otherwise ERROR
IOperandValueStorage* GetProperty ( ExprErrorDetails error,
WChar const *  name 
) const

Gets property by name.

Parameters
[out]errorA pointer to an ExprErrorDetails used to store the error information if there is any problem
[in]nameThe name of the property to get
Returns
A pointer to an IOperandValueStorage
WChar const* GetPropertyName ( ) const

Get current property name.

Returns
The name of current property
IPropertyProvider* Bentley::MstnPlatform::Relationship::getPropertyProvider ( ElementHandleCR  targetElement)

Return a pointer to the object that looks up properties on the specified element.

OperandToken* GetPropertyValue ( StatusInt errorDetails,
IGraphEvaluation graph,
Relation const &  rel,
UInt32  propId 
)

Get a relationship property value.

Parameters
[in]errorDetailsIf NULL is returned, the property holder should return an error status value here. The value should be one of:
  • MDLERR_NOTAVAILABLE - the value is temporarily unavailable (applicable to computed values only)
  • MDLERR_NOSUCHAPPLICATION - if the controlling application or element extension is not available
  • MDLERR_BADVERSION - the stored information is in a format not supported by the controlling application
  • ERROR - an unknown error
[in]graphOptional: If the relation is part of a graph, this is the graph
[in]relThe relationship to query
[in]propIdThe property to access
Returns
Property's value or NULL if unsuccessful
DgnModelRefP GetReferenceToModel ( DgnModelRefP  targetModel)

Get (or create) a reference attachment from this tempfile to targetModel.

Relation const& GetRelation ( ) const

Gets current Relation ready to use.

Returns
Current Relation
Relation& GetRelation ( ) const

Gets current Relation ready to use.

Returns
Current Relation
StatusInt GetRelationshipConnections ( ElementRefVector inputs,
ElementRefVector outputs,
Relation const &  rel 
)

Query the elements to which the specified relation is connected.

Parameters
[in]inputsOptional: inputs to relationship
[in]outputsOptional: outputs of relationship
[in]relRelationship to look up
Returns
Non-zero if relationship is not in the graph
RelationshipNodeInfo GetRelationshipNodeInfo ( Relation const &  )

Query information about the specified relationship as a node in the graph.

Returns
non-zero if relationship is not in the graph
void GetRelationshipsInTopologicalOrder ( ElementRefVector rels)

Get the list of relationships to be reevaluated, in topological order.

Parameters
[in]relsVector to be filled with relationships
void GetRelationshipsRemovedByBlockSubstitute ( ElementRefVector relsInBlock,
Relation const &  blockRel 
)

Returns the list of relations for which blockRel was added as a substitute.

That is, this function returns the relations that were removed from the graph when RemoveRelationshipsAndSubstituteBlock was called to add blockRel to the graph in their place. If blockRel was not added as a block substitute, then the returned set will be empty.

Parameters
[out]relsInBlockRelations that were removed by the call to RemoveRelationshipsAndSubstituteBlock
[in]blockRelA relation that was passed to RemoveRelationshipsAndSubstituteBlock
See also
IGraphManagerEventHandler::OnCyclesDetected
void GetRelationshipsThatDependOnElement ( ElementRefVector connectedRels,
ElementRefP  elRef 
)

Query the relationships that (might) use the specified element.

Parameters
[in]connectedRelsThe list of relations that (might) depend on elRef
[in]elRefThe element of interest
void GetRelationshipsThatInputGv ( ElementRefVector rels,
IGraphEvaluation graph,
GlobalVariableDictionaryIterator const &  iGv 
)

Query the relationships that (might) Input and therefore determine the value of the specified global variable.

Parameters
[in]relsThe list of relations that (might) Input the GV
[in]graphThe graph that will be used to analyze GV connections.
[in]iGvThe global variable
Remarks
See GetRelationshipsThatOutputGv
void GetRelationshipsThatOutputGv ( ElementRefVector rels,
IGraphEvaluation graph,
GlobalVariableDictionaryIterator const &  iGv 
)

Query the relationships that (might) Output and therefore determine the value of the specified global variable.

Parameters
[in]relsThe list of relations that (might) Output the GV
[in]graphThe graph that will be used to analyze GV connections.
[in]iGvThe global variable
Remarks
This method will build a partial graph, based on backpointers. For extensive graphs, this could take some time. If you plan to query multiple GVs that are part of the same logical graph, you should use the same graph object for all calls, in order to minimize graph-building performance penalties.
static StatusInt GetResultingUnits ( Units resu,
Units  lu,
Units  ru,
OpCode  op 
)
static

Gets the units of result.

Parameters
[out]resuA pointer to an Units used to store the resulting units
[in]luAn Units
[in]ruAn Units
[in]opAn OpCode
Returns
SUCCESS or ERROR
State GetState ( ) const

Query what the graph evaluator is currently doing.

RelationStatus GetStatus ( ) const

Get current status.

Returns
Current RelationStatus
WString GetStatusDetails ( ) const

Gets the details of status.

Returns
The details string
WString GetStatusDetails ( Relation const &  rel)

Provide a brief explanation of the relationship's current status.

This is used in path info strings, among other places.

Remarks
The purpose of this method is to not to report the status of the relationship but to explain it. Therefore, this method should not return the basic status. For example, if the status of the relationship is Violated, this method should not return the string "Violated". Instead, this method should return something like "...[tbd]
Parameters
[in]relThe relationship to query
Returns
A brief explanation of the relationship
WString GetStatusDetails ( Relation const &  rel)

Get the details of status.

Parameters
[in]relThe relationship to use
Returns
The details string
DgnPlatform::ElementHandle GetTargetElement ( ) const

Get the target element.

Returns
Current target element
DgnPlatform::ElementHandle GetTargetElement ( ) const

Gets target element.

Returns
An ElementHandle
DgnPlatform::ElementHandle GetTargetElement ( ) const

Gets target element.

Returns
An ElementHandle
void GetTargets ( ElementRefVector targets,
Relation const &  rel 
)

Query the targets of the specified relationship.

Parameters
[in]targetsThe vector to fill out
[in]relThe relationship to find
Remarks
Note that a "target" could be an input or an output
DgnModelRefP GetTempModel ( )

Get temp model.

StatusInt GetTemporaryElement ( EditElementHandleR  tempEh,
ElementRefP  baseElement,
WChar const *  tempName 
)

Get or create an element that is associated with the specified baseElement by name.

Parameters
[out]tempEhNew or existing element that is associated with the specified baseElement by name
[in]baseElementThe element to which the temporary is related (e.g., as a property of the host)
[in]tempNameA name to assign to the temporary element (e.g., a property name)
Returns
non-zero error status if the element could not be created
Remarks
If a temporary element with the same baseElement and the same tempName already exists, it is returned. If not, a new temporary element is created and returned.
You can add XAttributes to this element.
StatusInt GetTemporaryElementBase ( ElementRefP baseRef,
ElementRefP  tempElem 
)

Get the base element assigned to the temporary element when it was created.

Parameters
[out]baseRefThe base element assigned to this temporary element when it was created.
[in]tempElemTemporary element to query
Returns
SUCCESS if baseRef is returned or ERROR if tempElem is not a temporary element.
StatusInt GetTemporaryElementName ( WStringR  name,
ElementRefP  tempElem 
)

Get the description assigned to the temporary element when it was created.

Parameters
[out]nameThe description assigned to tempElem when it was created
[in]tempElemTemporary element to query
Returns
SUCCESS if description is returned or ERROR if tempElem is not a temporary element
ElementRefP GetTempPropRef ( ) const

Get the temp property element ref.

Returns
A pointer to current ElementRef
ElementRefP GetTempPropRef ( ElementRefP  baseElement,
WChar const *  propName 
)

Short hand for:

DgnPlatform::EditElementHandle eh;
GetTemporaryElement (eh, baseElement, propName);
ElementRefP ref = eh.GetElementRef ();
Token* GetTokenInRpnRelativeToCurrent ( int  i) const

Get token in the token vector at a given index.

Parameters
[in]iThe given index
Returns
A pointer to a Token
DgnPlatform::ElementHandle Bentley::MstnPlatform::Relationship::getTopLevelElement ( ElementHandleCR  elem)

Get the top level element handle.

Parameters
[in]elemThe ElementHandle to use
Returns
An ElementHandle
ElementRefP Bentley::MstnPlatform::Relationship::getTopLevelElement ( ElementRefP  ref)

Get the top level element ref.

Parameters
[in]refThe ElementRef to use
Returns
An ElementRefP
int GetTraceLevel ( ) const

Get the trace level.

Returns
The level of the tracing
See also
SetTraceLevel
Units GetUnits ( ) const

Gets the units of current operand.

Returns
An Units
OperandToken* GetValue ( ExprErrorDetails error) const

Get an OperandToken from an ExprErrorDetails.

Parameters
[in]errorA pointer to an ExprErrorDetails
Returns
A pointer to an OperandToken
See also
SetValue
OperandToken* GetValue ( StatusInt errorDetails,
ElementHandleCR  eh 
)

Query the property's value.

Returns
the property's value or NULL if the value is not available
Parameters
[out]errorDetailsIf NULL is returned, the property holder should return an error status value here. The value should be one of:
  • MDLERR_NOTAVAILABLE - the value is temporarily unavailable (applicable to computed values only)
  • MDLERR_NOSUCHAPPLICATION - if the controlling application or element extension is not available
  • MDLERR_BADVERSION - the stored information is in a format not supported by the controlling application
  • ERROR - an unknown error
[in]ehThe ElementHandle to use
Remarks
The caller is responsible for calling Release on the returned OperandToken. Using a smart pointer can make this easier. For example:
RefCountedPtr<OperandToken> val ( property->GetValue(), false );
OperandToken* GetValue ( ExprErrorDetails error) const

Gets current operand token.

Parameters
[out]errorA pointer to an ExprErrorDetails used to store the error information if there is any problem
Returns
A pointer to an OperandToken
OperandToken* GetValueAs ( ExprErrorDetails error,
const type_info &  typeWanted 
) const

Gets current operand token.

Parameters
[out]errorA pointer to an ExprErrorDetails used to store the error information if there is any problem
[in]typeWantedThe type to get as
Returns
A pointer to an OperandToken

Referenced by Bentley::MstnPlatform::Relationship::tokenOperand_cast(), and Bentley::MstnPlatform::Relationship::tokenOperand_checkType().

IOperandValueStorage* GetValueStorage ( ) const

Gets current operand value storage.

Returns
A pointer to an IOperandValueStorage
See also
SetValueStorage
void Bentley::MstnPlatform::Relationship::graphEvaluation_test ( )

Test graph evaluation.

GvValue ( IExpression const *  )
explicit

Generates a GvValue by an IExpression.

GvValue ( IExpression const *  ,
WChar const *   
)
explicit

Generates a GvValue by an IExpression and name.

GvValue ( IExpression const *  ,
GlobalVariableDictionaryChain *  ,
WChar const *   
)
explicit

Generates a GvValue by an IExpression, a name and a GlobalVariableDictionaryChain.

bool HasData ( )

Does this parameter have additional data?

Returns
true if has additional data, otherwise false
bool HasMoniker ( )

Does this parameter represent a reference to another element? See Relation for methods to add/delete monikers.

Returns
true if has, otherwise false
bool HasParameterDataItem ( ParameterId  pid) const

Query if the specified parameter exists and has custom data associated with it.

This is a convenience method that is equivalent to

FindParameterDataItem(pid).IsValid() 
Parameters
[in]pidA ParameterId
Returns
true if the specified parameter exists and has custom data associated with it, otherwise false
bool HasTwoPaths ( ) const

Query if the moniker has two paths.

This happens when a moniker is based on an intersection snap.

Returns
true if this moniker has two paths, otherwise false
IGraphManagerEventHandler ( )

Constructor.

IndexOp ( IExpression const *  )
explicit

Generates an index operator.

Int64Value ( )
explicit

Generates an Int64Value with a default value(0)

Int64Value ( Int64  d)
explicit

Generates an Int64Value with a given value.

IntValue ( )
explicit

Generates an IntValue with a default value(0)

IntValue ( Int32  d)
explicit

Generates an IntValue with a given value.

void InvalidateIters ( )

Re-computes iterators.

bool IsChanged ( )

Gets if the moniker target status has changed or not Note: If a parameter has a moniker, it also has a MonikerTargetStatus value, which has more information about the change to the target element.

Returns
true if changed, otherwise false
bool IsComplete ( IGraphEvaluation graph,
Relation const &  rel 
)

If the relationship can be reevaluated, then the handler should return true.

If the relationship cannot be reevaluated because one or more of its parameters is unresolved or deleted, then the handler should return false.

Parameters
[in]graphOptional: the graph of which this relationship is a part
[in]relThe relationship to query
bool IsComponent ( ElementHandleCR  eh)

Check if the specified element is a cell that contains relationships.

Returns
true if the input element is a cell that contains relationships, otherwise false
bool IsDictionaryElement ( ElementHandleCR  eh)

Check if the specified element is a global variable dictionary or expression table.

Returns
true if the input element is a global variable dictionary or expression table, otherwise false
bool IsEqualValue ( OperandToken rhs) const

Gets if current operand is equal with the given one.

Parameters
[in]rhsThe given operand to compare with
Returns
true if they are equal, otherwise false
static bool IsLogicalOperator ( OpCode  opCode)
static

Gets if an operator code is logical.

Parameters
[in]opCodeAn OpCode
Returns
true if the input operator code is logical, otherwise false
static bool IsLogicalOperator ( OpCode  opCode)
static

Gets if an operator code is logical.

Parameters
[in]opCodeAn OpCode
Returns
true if the operator code is logical, otherwise false
bool IsOpenOnElement ( bool  evenIfDeleted = false) const

Query if relationship was detected on host element.

Parameters
[in]evenIfDeletedIf the relationship has been deleted or not
Returns
true if the relationship is open on element, otherwise false
bool IsOutputOfAny ( ElementRefP  ) const

Query if there is any output information.

bool IsParameterDataItemDirty ( ParameterDataItemIterator it) const

Is parameter data item dirty?

Parameters
[in]itAn iterator pointing to the specified parameter
Returns
true if the parameter data item is dirty, otherwise false
See also
SetParameterDataItemDirty
bool IsReevaluationDisabled ( ) const

Check if reevaluation is disabled.

Returns
true if reevaluation is disabled, otherwise false
See also
DisableReevaluation
bool IsRelationshipElement ( ElementHandleCR  eh)

Check if the specified element is a relationship element, i.e., if it has a Relation XAttribute.

Returns
true if the input element is a relationship element, otherwise false
bool IsResolved ( ExprErrorDetails e = 0) const

Is the target property resolved?

Parameters
[out]eThe error information if not resolved
Returns
true if the target property is resolved, otherwise false
bool IsResolved ( ExprErrorDetails e = 0) const

Gets if current GV value is resolved or not.

Parameters
[out]eA pointer to an ExprErrorDetails used to store error information if there is any problem
Returns
true if it is resolved, otherwise false
bool IsSatisfied ( IGraphEvaluation graph,
Relation const &  rel 
)

The handler should check if the relationship is satisfied.

Remarks
This is called after reevaluation is done.
Parameters
[in]graphOptional: the graph of which this relationship is a part
[in]relThe relationship to check
Returns
true if the relationship is satisfied, otherwise false
bool IsSelfLoop ( Relation const &  )

Does the specified relation take any of its own outputs as an input?

bool IsStaticDPoint3d ( ) const

Query if this moniker contains only static (x,y,z) data.

To get the point, call EvaluatePoint

Returns
true if this moniker contains only static (x,y,z) data, otherwise false
bool IsTargetAvailable ( ) const

Query if all targets can be found.

Returns
true if all targets could be found, otherwise false
bool IsTargetAvailable ( )

Query if the target is available, i.e., resolved and not deleted.

Returns
true if is available, otherwise false
bool IsTemporaryElement ( ElementRefP  )

Query if the specified element was created in this TempFile.

bool IsUnitVector ( ) const

Gets if current vector value is an unit one.

Returns
true if current vector is an unit vector, otherwise false
bool IsUpToDate ( ) const

Test if no change flags are set => the relationship is up to date.

Returns
true if is up to date, otherwise false
bool IsValid ( ) const

Check if the Moniker contains path data.

An uninitialize Moniker is not valid. IsValid == true does not necessarily mean that the Moniker's target can be found.

Returns
true if the Moniker contains path data, otherwise false
See also
IsTargetAvailable to query if the target of a valid Moniker is found
LcsValue ( )
explicit

Generates a LcsValue with a default value(NULL)

LcsValue ( Transform const &  r)
explicit

Generates a LcsValue with a given value.

LogicalOp ( IExpression const *  ,
bool  isAnd,
UInt16  childCount,
bool  isBookend 
)
explicit
static ITokenFactory* LookupTokenFactory ( TokenClsId  clsid)
static

Query the factory registered to create Tokens associated with the specified clsid.

Parameters
[in]clsidIdentifier
Returns
The factory registered for this clsid
ModelRefValue ( IExpression const *  ,
DgnModelRefP   
)
explicit

Generates a ModelRefValue with DgnModelRef.

Moniker ( )

Support for vector of Moniker.

Moniker ( Moniker const &  )
Moniker ( DgnModelRefP  home,
PriorToLoading   
)

Initialize a Moniker prior to loading.

Moniker ( PersistentSnapPathCR  )
explicit

Initialize a Moniker that captures the specified DgnPlatform::PersistentSnapPath.

See also
Relation::AddMoniker
Remarks
This method makes a copy of the supplied DgnPlatform::PersistentSnapPath
Moniker ( DgnModelRefP  home,
DgnPlatform::AssocPoint const &  ,
DeepCopyOption  dco = DeepCopyOption_On 
)

Initialize a Moniker that captures the specified DgnPlatform::AssocPoint.

See also
Relation::AddMoniker

Initialize a Moniker that captures the specified DgnPlatform::PersistentElementPath.

That is, create a Moniker that points to an element and does not specify any particular point on that element.

See also
Relation::AddMoniker
Remarks
This method makes a copy of the supplied DgnPlatform::PersistentElementPath
void OnCyclesDetected ( IGraphEvaluation graph)

The graph contains cycles.

Call graph.GetCycles() to see the cycles. You may modify the graph (e.g., by calling graph.RemoveRelationshipsAndSubstituteBlock). If you do, you must call graph.TopologyChanged().

Example

Parameters
[in]graphThe graph to query
See also
Code Samples
IGraphEvaluation::GetCycles
IGraphEvaluation::RemoveRelationshipsAndSubstituteBlock
IGraphEvaluation::GetRelationshipsRemovedByBlockSubstitute
void OnParameterChange ( Relation rel,
ParameterId  pid,
MonikerIterator miter,
MonikerTargetStatus  change 
)

Callback invoked when the target of a moniker has been changed.

Remarks
This is invoked before reevaluation starts. This method is not invoked during reevaluation.
This method is rarely needed. Normally, a relationship should wait until the graph manager calls its Reevaluate method to react to parameter changes. Examples of the kind of things you could do in this method:
  • Delete the relationship when a target element disappears. This is optional. You can leave your relationship element in place with a broken link instead. See the example below.
  • Move the relationship element graphics in order to follow the target. Other things being equal, you could update the relationship element's graphics inside the Reevaluate method. Suppose, however, that you want your Reevaluate method to move the target to track the location of the relationship element. In this case, you might want to implement OnParameterChange to make the relationship element follow the target. That way, when the user moves the target explicitly, the relationship will follow it. When the relationship is moved programmatically, however, it will move the target.
  • Update cached data stored in the relationship element that must match the target. See comments for the case above for when you might want to do this.
  • Double-check when target is MONIKER_TARGET_STATUS_Resolved. "Resolved" means that the target of the moniker is stored in a different model from the relationship itself, and that model has been loaded. It's possible that the target element was modified when your relationship's model was not loaded, and your relationship was not notified. Now, your implementation of OnParameterChange should apply whatever test it can to determine if the relationship is still satisfied. See the example below.
Example:
virtual void MyRelationshipIHandler::_OnParameterChange
(
Relation& rel,
MonikerIterator& miter,
) override
{
switch (thisChange)
{
// The target of the moniker was changed.
// Normally, your handler should do nothing. Instead, wait for your Reevaluate method to be called.
break;
// maybe you should delete your relationship?
? rel.GetElemHandle().DeleteFromModel(); ?
// or maybe you should just mark it as incomplete
? rel.SetStatus (RELATION_STATUS_Incomplete); rel.GetElemHandle().ReplaceInModel(); ?
break;
// All you know is that a target in another model cannot be found. Maybe this is a temporary situation,
// because display of the the referenced model is turned off or because the referenced file is temporarily unavailable.
// The best way to handle this situation is to take no action here. Instead, be sure that you override the IsComplete
// method and make sure that it returns false when it detects that this target is unavailable. If IsComplete returns false,
// relationship manager will mark your relationship as "incomplete" and will not call your Reevaluate method.
break;
if (MyTestIfTheTargetHasChangedWhileOffLine (rel, miter)) // test for change, if you can.
{
rel.SetMonikerStatus (miter, MONIKER_TARGET_STATUS_Resolved);
rel.GetElemHandle().ReplaceInModel();
DgnPlatform::DependencyManager::RootChanged (miter.EvaluateElement ());
}
break;
}
}
Parameters
[in]relThe relation
[in]pidThe parameter's ID
[in]miterThe target element that changed
[in]changeHow the target element was changed
void OnParameterUndoRedo ( Relation rel,
ParameterId  pid,
MonikerIterator miter,
MonikerTargetStatus  change 
)

Callback invoked when a change to a parameter has been undone or redone.

the graph manager calls its Reevaluate method to react to changes to itself.

Remarks
Important: The handler should not not make any changes to elements!
Parameters
[in]relThe relation
[in]pidThe parameter's ID
[in]miterThe target element that changed
[in]changeHow the target element was changed
void OnReevaluate ( IGraphEvaluation const &  graph)

Called after each graph reevaluation.

Parameters
[in]graphAn IGraphEvaluation
Remarks
Reevaluation is triggered by direct changes to elements. Reevaluation is also triggered when the relationships that are fired in a reevaluation declare "discoveries." OnReevaluate is called after the initial reevaluation and after each follow-up reevaluate triggered by discoveries. Note a new IGraphEvaluation is created for each reevaluation.
See also
IManager::Reevaluate
IManager::DeclareDiscovery
void OnReevaluationsFinished ( )

Called after all graph reevaluations are finished, including the reevaluation triggered by direct changes and all follow-up reevaluations triggered by discoveries.

See also
OnReevaluate
IManager::Reevaluate
IManager::DeclareDiscovery
void OnRelationshipAdded ( ElementRefP  ref,
DgnModelRefP  model,
bool  isUndoRedo 
)

Called after relationship added.

Parameters
[in]refA pointer to an ElementRef to use
[in]modelA pointer to a DgnModelRef to query
[in]isUndoRedoIs undo or redo
void OnRelationshipChange ( Relation rel)

Callback invoked when the relationship element itself has been added, changed, or deleted.

Remarks
This is invoked before reevaluation starts
This method is rarely needed. Normally, a relationship should wait until the graph manager calls its Reevaluate method to react to changes to itself.
To detect relationship add, check relationship status for RELATION_STATUS_New. To detect deletion, check if the relationship element itself is deleted.
Parameters
[in]relThe relation
See also
IGraphManagerEventHandler
void OnRelationshipDeleted ( ElementRefP  ref,
DgnModelRefP  model,
bool  isUndoRedo 
)

Called after relationship deleted.

Parameters
[in]refA pointer to an ElementRef to use
[in]modelA pointer to a DgnModelRef to query
[in]isUndoRedoIs undo or redo
StatusInt OnRelationshipTransformed ( Relation rel,
TransformInfoCR  t 
)

Callback invoked when the relationship element itself has been transformed.

Parameters
[in]relThe relationship to query
[in]tThe TransformInfo to use
Returns
SUCCESS or ERROR
void OnRelationshipUndoRedo ( Relation rel)

Callback invoked when a add, change, or deletion of the relationship element itself has been undone or redone.

Remarks
Important: The handler should not not make any changes to elements!
This method is called on un-delete and re-create of the relationship element. There is no way for the callback to know this, however. rel.TstStatusFlag (RELATION_STATUS_New) returns false. The relation will simply appear to have been changed.
Parameters
[in]relThe relation
OperandPropertyBase ( )
explicit
OperandToken ( IExpression const *  )
explicit

Generates an operand token.

Moniker& operator= ( Moniker const &  m)
ExprErrorDetails& operator= ( ExprErrorDetails const &  e2)

Endow to current ExprErrorDetails with a given one.

Parameters
[in]e2The given ExprErrorDetails
Returns
A reference to an ExprErrorDetails
OperatorNop ( )
explicit
OperatorToken ( IExpression const *  x)
explicit
OrientationValue ( )
explicit

Generates an OrientationValue with a default value(NULL)

OrientationValue ( RotMatrix const &  r)
explicit

Generates an OrientationValue with a given value.

ParameterQuery ( Relation const &  ,
ParameterId   
)
ParameterQuery ( Relation const &  ,
ElementRefP   
)
ParameterQueryRW ( Relation ,
ParameterId   
)
PointValue ( )
explicit

Generates a PointValue with a default one(NULL)

PointValue ( DPoint3dCR  d)
explicit

Generates a PointValue with a given value.

int ProcessRelationshipsInCell ( ElementHandleCR  cell,
ProcessRelationshipsInModelCallback callback,
void *  arg2 
)

Invoke callback on each relationship in the specified cell.

Parameters
[in]cellThe cell to use
[in]callbackThe callback to invoke
[in]arg2Add an argument to callback
Remarks
If no relationships are found in the model, the callback will not be invoked and the return value will be zero.
Returns
the callback's return value if non-zero for any relationship; else zero.
int ProcessRelationshipsInModel ( DgnModelRefP  modelRef,
ProcessRelationshipsInModelCallback callback,
void *  arg2,
UShort const *  types = 0,
UShort  sizeofTypes = 0 
)

Invoke callback on each relationship in the specified model.

Parameters
[in]modelRefThe model to use
[in]callbackThe callback to invoke
[in]arg2Add an argument to callback
[in]typesOPTIONAL: array of TMSKXXX masks, as for scanning
[in]sizeofTypesThe number of bytes of data pointed to by types
Remarks
The scan stops as soon as the callback returns a non-zero value.
If no relationships are found in the model, the callback will not be invoked and the return value will be zero.
If the types parameter is supplied, then only elements of the specified types are considered. If types is NULL, then the following element masks are used: _types[0] = TMSK0_CELL_HEADER; _types[6] = TMSK6_EXTENDED|TMSK6_EXTENDED_NONGRAPHIC_ELM;
Returns
The callback's return value if non-zero for any relationship; else zero.
void RecordFirstDirectChange ( UInt64  i)

Record the first direct change.

Parameters
[in]iAn UInt64 value
See also
GetFirstDirectChange,RecordFirstDirectChange
void Reevaluate ( IGraphEvaluation graph,
Relation rel 
)

Callback invoked after all parameter changes have been recorded and the relationship should be reevaluated.

MicroStation calls Reevaluate on relationships in bottom-up dependency order.

Parameters
[in]graphAn IGraphEvaluation
[in]relThe relation
void Reevaluate ( GraphBuildingOptions  gbOptions = GBOPTIONS_DeferEnterGraph)

Reevaluate all relationships affected by direct changes and all relationships affected indirectly by them.

Parameters
[in]gbOptionsOptions to control graph-building
Remarks
This method does nothing if reevaluation is disabled.
See also
DisableReevaluation
void Reevaluated ( IGraphEvaluation graph,
Relation rel 
)

Callback invoked after all relationships in the graph have been reevaluated.

If the relation has a graphical representation, it should update its graphical element data in this callback.

Parameters
[in]graphOptional: the graph of which this relationship is a part
[in]relThe relationship to update
Remarks
This method is called:
  • After all relationships have been reevaluated, if this relationship was either modified directly or was affected by a change to another element. Note: The Manager has already called IsSatisfied and has set the relation's status accordingly.
  • After IManager::EnableRelationship is called on this relationship. Note: The Manager has already set the relation's status to Disabled.
void RegisterEventHandler ( IGraphManagerEventHandler eventHandler)

Register a relationship event-handler.

Parameters
[in]eventHandlerThe event handler
IHandler* RegisterHandler ( HandlerPublicIdPart  pubid,
HandlerPrivateIdPart  privid,
IHandler handler 
)

Register an relationship handler by the specified Id.

Returns
the relationship handler previously registered for that Id.
Parameters
[in]pubidThe public part of the handler's unique ID. This must be a value allocated from the XAttributeHandlerMajorIDs value space.
[in]prividThe private part of the handler's unique ID. This value can be anything.
[in]handlerThe handler
Returns
A pointer to an IHandler
void RegisterHandlers ( )

Trigger static initialization of relationship manager.

This registers the relationship manager's internal XAttribute handlers, among other things.

void RegisterIRelationDependencyHelper ( IRelationDependencyHelper h)

Register an IRelationDependencyHelper.

Parameters
[in]hThe IRelationDependencyHelper to register
static ITokenFactory* RegisterTokenFactory ( TokenClsId  clsid,
ITokenFactory handler 
)
static

Register a factory to create Tokens associated with the specified clsid.

Parameters
[in]clsidIdentifier
[in]handlerThe Factory
Returns
The factory previously registered for this clsid
Relation ( )

Prep for load from persistent storage.

Relation ( ElementRefP  ,
DgnModelRefP  modelRef 
)

Set up to read and write relationship data on the specified element.

Relation ( MSElementDescrP  ,
bool  ownsElement 
)

Set up to read and write relationship data on the specified element.

Relation ( MSElementDescrCP  )

Set up to read relationship data on the specified element.

Relation ( MSElementDescrP  ed,
HandlerPublicIdPart  amid,
HandlerPrivateIdPart  actid,
bool  relTakesOwnership,
DgnModelRefP  m = 0 
)

Prepare for creating new relationship.

Relation ( ElementRefP  ,
DgnModelRefP  ,
HandlerPublicIdPart  amid,
HandlerPrivateIdPart  actid 
)

Prepare for creating new relationship.

void Bentley::MstnPlatform::Relationship::relationship_cleanTables ( )

Clean tables.

StatusInt Bentley::MstnPlatform::Relationship::relationship_elementHandleRewrite ( EditElementHandleR  edh)

Rewrite element handle.

Parameters
[in]edhThe EditElementHandle to use
Returns
SUCCESS or ERROR
void Bentley::MstnPlatform::Relationship::relationship_initializeApp ( )

Initialize application.

void Bentley::MstnPlatform::Relationship::relationship_staticInitialize ( )

You must call this function at least once before using relationship mgr.

WString Bentley::MstnPlatform::Relationship::relationshipDebug_getDefaultMonikersDesc ( Relation const &  crel)

Get the description of default monikers.

Parameters
[in]crelThe relationship to get monikers from
Returns
The description string
WString Bentley::MstnPlatform::Relationship::relationshipDebug_getDefaultRelationshipDesc ( Relation const &  rel)

Get the description of default relationship.

Parameters
[in]relThe relationship to use
Returns
The description string
void Bentley::MstnPlatform::Relationship::relationshipDebug_registerTiming ( ITiming *  tm)

Register timing.

Parameters
[in]tmThe ITiming to register
void Bentley::MstnPlatform::Relationship::relationshipDebug_unRegisterTiming ( ITiming *  tm)

Unregister timing.

Parameters
[in]tmThe ITiming to remove
RelationshipPropertyAccess ( IHandler ,
IGraphEvaluation graph,
UInt32  propId 
)
void Release ( )

Subtract one from ref count.

See also
AddRef
void Release ( )

Subtract one from ref count.

See also
AddRef
void ReleaseToken ( )

Releases current token.

void RemoveElement ( ElementRefP  elRef)

Remove the specified element from the graph.

Parameters
[in]elRefElement to remove
void RemoveFirstDirectChange ( )

Remove the first direct change.

See also
RecordFirstDirectChange,GetFirstDirectChange
void RemoveInput ( Relation const &  rel,
ElementRefP  elRef 
)

Remove el as an input to rel.

Parameters
[in]relRelationship to modify
[in]elRefElement to remove from relationship's input list
void RemoveInput ( Relation const &  ,
Moniker  
)

Remove the element identified by the specified moniker from the inputs of the relation.

StatusInt RemoveItem ( UInt16  i)

Removes an item from current array.

Parameters
[in]iThe position of the item to remove at
Returns
SUCCESS if removed, otherwise ERROR
See also
AddItem
void RemoveOutput ( Relation const &  rel,
ElementRefP  el 
)

Remove el as an output of rel.

Parameters
[in]relRelationship to modify
[in]elElement to remove from relationship's output list
void RemoveOutput ( Relation const &  ,
Moniker  
)

Remove the element identified by the specified moniker from the outputs of the relation.

StatusInt RemoveRelationship ( Relation const &  rel,
bool  suppress = true 
)

Remove the specified relationship from the graph and optionally mark it as suppressed.

Parameters
[in]relRelationship to remove
[in]suppressMark the relationship as suppressed?
Returns
Non-zero if relation was not in the graph
void RemoveRelationshipsAndSubstituteBlock ( Relation const &  blockRel,
ElementRefVector const &  relsInBlock 
)

Substitutes blockRel for the relationships in relsInBlock.

This is useful for cases where a set of relationships are found to make up a simultaneous block. You can substitute blockRel for them. That causes graph evalaution to delegate of solving all of the relationships in the block to blockRel.

Remarks
blockRel must keep some internal record of what relationships it controls. There will be no connection in the graph
This method removes each relation in relsInBlock from the graph and marks each removed relation as suppressed. This method then assigns all of the inputs of the removed relations as inputs to blockRel and all of their their outputs as outputs from blockRel. This method then enrolls blockRel in the graph.
For example, suppose relationships r3 and r4 must work together to compute elements E3 and E4. Or, suppose that an output of r3 is an input to r4, and an output of r4 is an input to r3.
                case 1                          case 2
              r1        r2                   r1        r2
               \        /                     \        /
                v      v                       v      v
                E1    E2                        E1  E2
                 | \/ |                         |^  ^|
                 | /\ |                         | \/ |
                 v    v                         v /\ v
                r3    r4                        r3  r4
                 | \/ |                         |    |
                 | /\ |                         |    |
                 v    v                         v    v
                E3    E4                       E3    E4
                /       \                      /       \
               v         v                    v         v
              r5         r6                  r5         r6

In the first case, the graph manager will not be able to determine an order for r3 and r4. In the second case, there is a cycle, which prevents the graph manager from scheduling the graph at all. Either kind of problem can be solved by calling:

graph->RemoveRelationshipsAndSubstituteBlock (blockRel, ElementRefSet{r3,r4})

That will cause the graph manager to reduce this graph to:

                case 1                         case 2
              r1        r2                  r1        r2
               \        /                    \        /
                v      v                      v      v
                E1    E2                      E1    E2
                 |    |                        |    |
                 v    v                        v    v
                 blockRel                      blockRel
                 |    |                        |    |
                 v    v                        v    v
                E3    E4                      E3    E4
                /       \                     /       \
               v         v                   v         v
              r5         r6                 r5         r6

In both cases, the dependencies become clear and the graph is free of cycles. Note that it will be up to blockRel to do the work.

Remarks
This method may be called from IGraphManagerEventHandler::OnCyclesDetected
Parameters
[in]blockRelThe simultaneous block relationship
[in]relsInBlockThe relationships to go into the block
See also
GetRelationshipsRemovedByBlockSubstitute
IGraphManagerEventHandler::OnCyclesDetected
StatusInt Resolve ( ExprErrorDetails e) const

Resolves current GV value.

Parameters
[out]eA pointer to an ExprErrorDetails used to store error information if there is any problem
Returns
SUCCESS if resolved, otherwise false
void ReverseRelation ( Relation const &  )

Reverse relation.

StatusInt SaveChanges ( EditElementHandleR  ehandle)

Called after one or more IPropertyAccess::SetValue calls have been made.

The provider should rewrite the target element to file.

Parameters
[in]ehandleThe element to be saved
Returns
non-zero error status code if save failed
StatusInt SavePropertyChanges ( IGraphEvaluation graph,
Relation rel 
)

One or more calls to SetPropertyValue have been made.

Now is the time to commit these changes

Parameters
[in]graphOptional: If the relation is part of a graph, this is the graph
[in]relThe relationship to query
void SetDeepCopyOption ( DeepCopyOption  option)

Specify if root should be deep-copied when the relation that owns this moniker is copied.

Parameters
[in]optionThe type of deep-copying
See also
GetDeepCopyOption
void SetExpression ( IExpression const *  expression)

Sets expression.

Parameters
[in]expressionA const pointer to an IExpression
See also
GetExpression
void SetGraphBuildingOptions ( GraphBuildingOptions  o,
bool  set 
)

Set graph building options.

Parameters
[in]oA GraphBuildingOptions
[in]setA bool value
void SetHandlerPrivateIdPart ( HandlerPrivateIdPart  aid)

Set relationship handler's value Note: a handler private key part is meaningful only to the relationship handler.

Parameters
[in]aidA HandlerPrivateIdPart
See also
GetHandlerPrivateIdPart
void SetHandlerPublicIdPart ( HandlerPublicIdPart  aid)

Set relationship's relationship handler.

Parameters
[in]aidA HandlerPublicIdPart
See also
GetHandlerPublicIdPart
void SetHomeModelRef ( DgnModelRefP  m)

Set the home model ref.

Parameters
[in]mA pointer to a DgnModelRef
See also
GetHomeModelRef
void SetMonikerStatus ( MonikerIterator it,
MonikerTargetStatus  status 
)

Set/clear moniker target change status.

Parameters
[in]itThe moniker iterator to get the status from
[in]statusA MonikerTargetStatus
See also
SetMonikerStatus
void SetParameterChanged ( ParameterQuery pq)

Set the parameter's status to dirty.

If the parameter has a Moniker, its status is set to MONIKER_TARGET_STATUS_Changed

Parameters
[out]pqA ParameterQuery in which the status will be changed
void SetParameterDataItemDirty ( ParameterDataItemIterator it,
bool  d 
)

Set/clear parameter data item dirty status.

Parameters
[in]itAn iterator pointing to the specified parameter
[in]dA bool value to endow to the specified parameter item dirty status
See also
IsParameterDataItemDirty
StatusInt SetPropertyValue ( IGraphEvaluation graph,
Relation rel,
UInt32  propId,
OperandToken const &  newValue 
)

Set a relationship property value.

Parameters
[in]graphOptional: If the relation is part of a graph, this is the graph
[in]relThe relationship to query
[in]propIdThe property to access
[in]newValueThe new value to use
Returns
SUCCESS if the update was done; MDLERR_NOCHANGE if the value is not different MDLERR_WRITEINHIBIT if the property is read-only MDLERR_TYPESINCOMPATIBLE if the new value is an incompatible type
void SetSkipRelativeToCurrent ( int  startSkip,
int  nSkip 
) const

Set skipping section.

Parameters
[in]startSkipThe start skipping number used to set the beginning of current expression
[in]nSkipThe skipping span used to set the tail of current expression
void SetStatusFlag ( RelationStatus  flagToTurnOn)

Set the specified status flags.

Parameters
[in]flagToTurnOnA RelationStatus
void SetToken ( Token token)

Sets token.

Parameters
[in]tokenA pointer to a Token to set
void SetTraceLevel ( int  level,
FILE *  fp 
)

Set the trace level.

Parameters
[in]levelThe trace level. 0 means no tracing.
[in]fpWhere to write trace messages. NULL for stdout.
See also
GetTraceLevel
void SetUpToDate ( )

Clear all change flags => the relationship is up to date.

ExprErrorDetails SetValue ( OperandToken token)

Set error details with a token.

Parameters
[in]tokenA pointer to an OperandToken
Returns
An ExprErrorDetails
See also
GetValue
StatusInt SetValue ( EditElementHandleR  ,
OperandToken const &  newValue 
)

Update the property's value.

Parameters
[in]newValueThe new value for the property
Returns
non-zero error status if the write failed. The returned status value should be one of:
  • MDLERR_NOCHANGE - the proposed value is equal to the current value.
  • MDLERR_WRITEINHIBIT - the property is read-only
  • MDLERR_TYPESINCOMPATIBLE - the proposed value is type-incompatible with the property
void SetValueStorage ( IOperandValueStorage const *  val)

Sets current operand value storage.

Parameters
[in]valA const pointer to an IOperandValueStorage
See also
GetValueStorage
virtual void StartTiming ( )
pure virtual
StdBinOp ( IExpression const *  )

Generates a default binary operation.

StdBinOp ( IExpression const *  ,
OpCode   
)
explicit

Generates a binary operator with a given operator code.

StdUnOp ( IExpression const *  )

Generates a default unary operator.

StdUnOp ( IExpression const *  ,
OpCode  opCode 
)
explicit

Generates an unary operator with a given operator code.

StringValue ( )
explicit

Generates a default StringValue (NULL)

StringValue ( WChar const *  s)
explicit

Generates a StringValue with a given string.

StatusInt Bentley::MstnPlatform::Relationship::stripAllMonikerXas ( Relation &  rel)

Strip all moniker XAttributes for the specified relationship.

Parameters
[in]relThe Relation to strip
Returns
SUCCESS if all moniker XAttributes of the input relationship are stripped
StatusInt Bentley::MstnPlatform::Relationship::stripAllRelationshipXas ( Relation &  rel)

Strip all relationship XAttributes for the specified Relation.

Parameters
[in]relThe Relation to strip
Returns
SUCCESS if all relationship XAttributes of the input relationship are stripped
TempFile ( )
Token ( )

Generate an object of Token.

TokenLoader ( IExpression const *  )
explicit

Generates a TokenLoader with an IExpression.

TokenLoader ( IExpression const *  ,
Token ,
bool  doAddRef = true 
)
explicit

Generates a TokenLoader with an IExpression, a Token and a bool value which represents if add ref for this token or not.

TokenLoader ( IExpression const *  ,
Token const *   
)
explicit

Generates a TokenLoader with an IExpression, a Token.

T* Bentley::MstnPlatform::Relationship::tokenOperand_cast ( ExprErrorDetails *  error,
OperandToken const *  operand 
)

Casts operand token as a given type.

References OperandToken::GetValueAs().

T* Bentley::MstnPlatform::Relationship::tokenOperand_cast ( OperandToken const *  operand)

Casts operand token as a given type.

References OperandToken::GetValueAs().

StatusInt Bentley::MstnPlatform::Relationship::tokenOperand_checkType ( OperandToken const &  operand)

Checks if the input operand token is a given type or not.

References Bentley::ERROR, OperandToken::GetValueAs(), NULL, and Bentley::SUCCESS.

void TopologyChanged ( )

Reset the state of the graph evaluation.

Call this, for example, after calling WhatIfChanged and/or GetRelationshipsInTopologicalOrder, then making changes to the graph (adding, removing relations) and before calling WhatIfChanged and/or GetRelationshipsInTopologicalOrder again

bool TstStatusFlag ( RelationStatus  flag) const

Test if all of the specified status flags are set.

Parameters
[in]flagA RelationStatus
UnOpCode ( TokenClsId  c,
UInt16  o 
)
void UnRegisterEventHandler ( IGraphManagerEventHandler eventHandler)

Un-register an event-handler.

Parameters
[in]eventHandlerThe handler to remove
void UnRegisterHandlerStar ( HandlerPublicIdPart  pubid)

Un-register all relationship handlers with the specified public id part.

Parameters
[in]pubidThe public part of the handler's unique ID
void UnRegisterIRelationDependencyHelper ( IRelationDependencyHelper h)

Un-register an IRelationDependencyHelper.

Parameters
[in]hThe IRelationDependencyHelper to remove
static void UnRegisterTokenFactory ( TokenClsId  clsid)
static

Un-register the Token factory registered under this clsid.

Parameters
[in]clsidIdentifier
StatusInt UpdateData ( IPersistentParameterData const &  pd)

Updates the custom data associated with the specified parameter.

Parameters
[out]pdAn IPersistentParameterData used to store the updated data
Returns
SUCCESS if updated data, otherwise ERROR
StatusInt UpdateMoniker ( Moniker const &  moniker)

Updates current moniker.

Parameters
[in]monikerA Moniker used to update the current one
Returns
SUCCESS if updated, otherwise ERROR
StatusInt UpdateMoniker ( MonikerIterator mIter,
Moniker const &  moniker 
)

Update the moniker associated with the specified parameter.

Warning
The moniker is redefined to point to the new version
This may invalidate other outstanding iterators
Parameters
[in]mIterA MonikerIterator
[in]monikerA const reference to a Moniker used to update the moniker associated with the specified parameter
Returns
SUCCESS if updated, otherwise ERROR
StatusInt UpdateParameterDataItem ( ParameterDataItemIterator it,
IPersistentParameterData const &  pd 
)

Update the custom data associated with the specified parameter.

Parameters
[in]itAn iterator pointing to the specified parameter
[in]pdThe custom data to associate with the parameter
Returns
SUCCESS if updated, otherwise ERROR
VectorValue ( )
explicit

Generates a VectorValue with a default value(NULL)

VectorValue ( DVec3d const &  d)
explicit

Generates a VectorValue with a given value.

bool WasElementChangedPriorTo ( ElementRefP  e1,
ElementRefP  e2 
)

Query if e1 was changed "before" e2, considering the order in which changes arrived and the order in which elements appear in a breadth-first search.

Parameters
[in]e1An element
[in]e2Another element
Returns
true if e1 was changed "before" e2, otherwise false
bool WasReevaluated ( Relation const &  )

Query if rel has been reevaluated yet.

void WhatIfChanged ( ElementRefVector const &  changedEls,
ElementRefVector const &  changedRels 
)

Evaluates what would happen if the specified elements were changed.

Remarks
The purpose of this method is to discover any relationships that (might) be affected by the specified direct changes. This method uses peristent element back-pointers, built-in structural relationships between elements, and implicit relationships between elements and their properties to discover the full scope of impact. As it discovers dependents, this method adds relationships and elements to the graph and defines input and output connections between them. If all dependent relationships have already been enrolled in the graph, then this method will do nothing.
Parameters
[in]changedElsList of elements that changed (hypothetically)
[in]changedRelsList of relationships that were changed directly (hypothetically)
See also
GetElementConnections
IGraphEvaluationPtr WhatIfChanged ( ElementRefVector const &  changedEls,
ElementRefVector const &  changedRels,
GraphBuildingOptions  gbOptions = GBOPTIONS_DeferEnterGraph 
)

Evaluates what would happen if the specified element were changed.

Parameters
[in]changedElsList of elements that changed (hypothetically)
[in]changedRelsList of relationships that were changed directly (hypothetically)
[in]gbOptionsOptions to control graph-building
Returns
A graph that can be queried for the effects of the hypothetical change
Remarks
The caller is responsible for deleting the graph when done with it.
StatusInt Bentley::MstnPlatform::Relationship::writeXaChanges ( EditElementHandleR  eh)

Write XAttribute changes.

Parameters
[in]ehThe EditElementHandle to use
Returns
SUCCESS if the changes are written successfully, otherwise ERROR
virtual ~ArrayValue ( )
virtual

Destructor.

virtual ~DerivedPropertyBase ( )
virtual

Destructor.

virtual ~ElementProperty ( )
virtual

Destructor.

virtual ~ElementRefValue ( )
virtual

Destructor.

~ExprErrorDetails ( )

Destructor.

virtual ~GvValue ( )
virtual

Destructor.

virtual ~IExpression ( )
virtual

Destructor.

virtual ~IGraphEvaluation ( )
virtual

Virtual desctructor.

virtual ~IOperandValueStorage ( )
virtual

Virtual destructor.

virtual ~ModelRefValue ( )
virtual

Destructor.

virtual ~OperandPropertyBase ( )
virtual
virtual ~OperandToken ( )
virtual

Destructor.

~ParameterQuery ( )
~Relation ( )

Clean up.

virtual ~StringValue ( )
virtual

Destructor.

virtual ~TempFile ( )
virtual
virtual ~Token ( )
virtual

Destructor.

~TokenLoader ( )

Destructor.

Variable Documentation

UInt32 addGlobalOrigin
UInt32 applyRefDisplayScale
TokenClsId clsId
TokenClsId clsId
ExprErrorCode code
int cycleID

Set by IGraphEvaluation::TopologicalSort. If this is non-zero, the relation is involved in a cycle. All other relations with the same cycleId are in the same cycle.

int cycleID

Set by IGraphEvaluation::TopologicalSort. If this is non-zero, the relation is involved in a cycle. All other relations with the same cycleId are in the same cycle.

int distanceFromRoot

The number of relations and elements that were traversed from directly changed element to this relation.

int distanceFromRoot

number of relations and elements that were traversed from directly changed element to this element

int dtime

When relation was discovered during topological sort. Note: this does not tell you when the relation or its inputs were changed.

int ftime

When relation was added to the topological sort. Note: this does not tell you when the relation or its inputs were changed.

UInt32 is3d
bool isInternal

Is relation an internally generated relation, such as the structural relationship between a cell and its components?

bool isInternal

is element an internally generated element, such as a property?

StatusInt m_error
IExpression const* m_expression
FnCode m_fnCode
bool m_holdsRef
OpCode m_opCode
OpCode m_opCode
int m_refCount
Token* m_token
Units m_units
WChar* m_value
bool m_value
double m_value
Int32 m_value
Int64 m_value
DPoint3d m_value
DVec3d m_value
RotMatrix m_value
Transform m_value
OperandTokenVector* m_vec
DgnModelRefP modelRef
ExprErrorDetails none
static

A static member of ExprErrorDetails.

UInt16 opCode
UInt16 opCode
int s_totalRefCount
static
int s_totalRefCount
static
Token const* token1
Token const* token2
WString whatFailed

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