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 |
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 |
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.
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.
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.
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.
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.
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.
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
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.
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.
Conceptually, a relationship element contains two kinds of data: Monikers and non-pointer properties.
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.
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.
#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 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 *) |
enum EvaluateMode |
The reason why Evaluate has been called.
enum ExprErrorCode |
Expression parsing and evaluate Error codes.
enum FnCode |
Defines function types.
enum GraphBuildingOptions |
enum MonikerTargetStatus |
The status of a parameter in a relationship.
enum OpCode |
enum OpCode |
enum RelationStatus |
The up-to-date status of a relationship.
enum SigType |
enum State |
enum TokenClsId |
Token factory classIds.
enum Units |
|
protectedvirtual |
void AddInput | ( | Relation const & | rel, |
ElementRefP | elRef | ||
) |
Declare that elRef is an input to rel.
[in] | rel | Relationship to modify |
[in] | elRef | Element to add to relationship's input list |
Add the element identified by the specified moniker as an input to the relation.
UInt16 AddItem | ( | OperandToken * | token | ) |
Adds an item into current array.
[in] | token | An OperandToken to add |
StatusInt AddMoniker | ( | MonikerIterator * | newIt, |
ParameterId | id, | ||
Moniker const & | moniker | ||
) |
Add a moniker to the specified parameter.
[out] | newIt | optional: iterator pointing to new moniker |
[in] | id | The specified parameter Id |
[in] | moniker | The moniker to add |
void AddOutput | ( | Relation const & | rel, |
ElementRefP | elRef | ||
) |
Declare that elRef is an output of rel.
[in] | rel | Relationship to modify |
[in] | elRef | Element to add to relationship's output list |
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.
[out] | it | optional: An iterator pointing to the new parameter |
[in] | pid | The unique ID that the caller wishes to assign to the new parameter |
[in] | pd | The custom data to associate with the parameter |
void AddRef | ( | ) |
Add one to ref count.
void AddRef | ( | ) |
Add one to ref count.
void AddToken | ( | Token * | t | ) |
Add a token to the expression during expression creation.
[in] | t | The token to add |
bool AnyChanges | ( | ) | const |
Query if any of the modification methods was called.
|
virtual |
Applies the relative functions with one operand.
|
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.
[out] | error | A pointer to an ExprErrorDetails used to store the error information if there is any problem |
[in] | opCode | A binary operator type to apply |
[in] | operand | An operand used in current operation |
|
virtual |
Applies the relative functions with more than two operands.
ExprErrorDetails ApplyUnits | ( | Units | unit, |
DgnModelRefP | modelRef, | ||
char const * | unitsStr | ||
) |
Applies units.
[in] | unit | An Units to apply |
[in] | modelRef | A pointer to a DgnModelRef |
[in] | unitsStr | An units string |
OperandToken* ApplyUnOp | ( | ExprErrorDetails * | error, |
UnOpCode | opCode | ||
) | const |
Executes an unary operator with the given binary type and operand.
[out] | error | A pointer to an ExprErrorDetails used to store the error information if there is any problem |
[in] | opCode | An unary operator type to apply |
|
explicit |
Generates an ArrayValue with a default value(NULL)
|
explicit |
MonikerIterator BeginMonikers | ( | ) | const |
Get iterator over monikers.
ParameterDataItemIterator BeginParameterDataItems | ( | ) | const |
Get an iterator over custom parameter data items.
BinOpCode | ( | TokenClsId | c, |
UInt16 | o | ||
) |
|
explicit |
Generates a BltFns with an IExpression.
|
explicit |
Generates a BltFns with an IExpression and FnCode.
|
explicit |
Generates a Boolean value with a default value(false)
|
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.
[in] | graph | Optional: If the relation is part of a graph, this is the graph |
[in] | rel | The relationship to query |
[in] | propId | The property to access |
[in] | newValue | The proposed new value |
StatusInt CheckType | ( | OperandToken const & | newValue, |
ElementHandleCR | |||
) |
Check if the the property's value could by updated using the specified new value.
[in] | newValue | The 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.
[in] | statusToClear | Mask identify the status flags to be cleared (others are preserved) |
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
[in] | pq | A 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.
[in] | flagToTurnOff | A RelationStatus |
|
explicit |
Generates a comma operator.
|
explicit |
Generates a conditional operator.
OperatorToken* Create | ( | IExpression * | x, |
char const * | identifier | ||
) |
Create the operator identified during parsing of an expression.
[in] | x | The expression of which operator is to be a part |
[in] | identifier | The name of the 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.
[out] | eh | The element created |
[in] | amid | The new relation's major public id |
[in] | actid | The new relation's minor public id |
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.
[in] | relRef | The relationship to process |
[in] | allMonikers | If 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.
[in] | ref | The 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.
[in] | ref | The element to discover |
StatusInt Delete | ( | Relation & | rel | ) |
Delete a relationship by deleting the relationship element.
[in] | rel | The relation to delete |
StatusInt DeleteRelationship | ( | Relation & | rel | ) |
Delete a relationship, just delete the relationship element.
[in] | rel | The relationship to remove |
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.
[in] | target | A pointer to an ElementRef |
|
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.
|
explicit |
Generates a dot operator.
|
explicit |
Generates a DoubleValue with a default one.
|
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.
[in] | it | The moniker iterator to drop |
StatusInt DropParameterDataItem | ( | ParameterDataItemIterator & | it | ) |
Remove the custom data associated with the specified parameter.
[in] | it | A reference to a ParameterDataItemIterator to be dropped |
void Dump | ( | ) |
Dump current information.
|
explicit |
Generate an object of ElementProperty with parameters.
|
explicit |
Generate an object of ElementProperty with an IPropertyAccess.
|
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.
[in] | ref | The element to be enabled |
[in] | enable | A bool value to use |
|
pure virtual |
void EnrollDependentRelations | ( | IGraphEvaluation & | graph, |
ElementHandleCR | eh | ||
) |
Enroll dependent relations.
[in] | graph | An IGraphEvaluation to enroll |
[in] | eh | An ElementHandleCR to use |
void EnrollElement | ( | ElementRefP | elRef, |
Relation const & | rel | ||
) |
Tell the graph about a potentially new element.
[in] | elRef | Potentially new element |
[in] | rel | The relationship that uses the element |
void EnrollRelationship | ( | Relation const & | rel, |
ElementRefP | elRef | ||
) |
Tell the graph about a potentially new relationship.
[in] | rel | Potentially new relationship |
[in] | elRef | Element 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.
[in] | rel | The relation |
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.
[in] | rel | The relation |
|
static |
Enumerate the properties of relationship.
[in] | strVec | A string vector used to store the enumerated properties |
[in] | ehandle | An ElementHandleCR used to get the properties |
void EnumerateProperties | ( | WStringVector & | strVec, |
ElementHandleCR | |||
) |
Query the properties supported by the specified element.
[in] | strVec | A string vector to receive WString's |
void EnumerateProperties | ( | WStringVector & | strVec, |
Relation const & | rel | ||
) |
The relationship should return the properties that it supports.
[in] | strVec | Vector to receive WString's |
[in] | rel | The relationship to query |
bool EqualsLocalElement | ( | DgnPlatform::ElementId | eId | ) | const |
Convenience method to see if current element is equal with the local one.
[in] | eId | The Id of the element to compare with |
ExprErrorDetails Evaluate | ( | OperandToken ** | result = 0 | ) | const |
Evaluate the expression.
[out] | result | optional: The resulting value of the expression. Set only if Evaluate does not return an error code. |
DgnPlatform::ElementHandle EvaluateElement | ( | bool | wantFirst = true | ) |
Try to get a handle on the referenced element.
See Moniker for reasons why this might fail.
[in] | wantFirst | If 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. |
DgnPlatform::ElementHandle EvaluateElement | ( | bool | wantFirst = true | ) | const |
Get (first) target element.
[in] | wantFirst | If 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. |
StatusInt EvaluatePoint | ( | DPoint3d & | pt | ) |
Get the point identified by the snap.
[out] | pt | The point (transformed into the coordinate system of the home model aka "world coordinates") |
DgnPlatform::ElementHandle EvaluateReferenceAttachment | ( | bool | wantFirst = true | ) | const |
Get the reference attachment used to access the (first) target element.
[in] | wantFirst | If 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. |
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.
[in] | e2 | The given ExprErrorDetails to copy |
MonikerIterator FindMoniker | ( | ParameterId | id | ) | const |
Find the moniker associated with the specified parameter.
[in] | id | The parameter Id to search |
ParameterDataItemIterator FindParameterDataItem | ( | ParameterId | pid | ) | const |
Find the custom data associated with the specified parameter.
[in] | pid | A ParameterId to search |
|
static |
Find a relationship property by its name.
[in] | ehandle | An ElementHandleCR used to search |
[in] | nm | A property name |
[in] | context | A void pointer |
IPropertyAccess* FindPropertyByName | ( | ElementHandleCR | ehandle, |
WChar const * | nm, | ||
void * | context | ||
) |
Look up the specified property.
[in] | ehandle | The element to query for the property |
[in] | nm | The name of the property to find |
[in] | context | A void pointer |
StatusInt FindPropertyByName | ( | UInt32 * | propId, |
IGraphEvaluation * | graph, | ||
Relation const & | rel, | ||
WChar const * | nm | ||
) |
Ask the relationship to look up the specified property.
[out] | propId | Optional: the ID of the property if successful |
[in] | graph | Optional: the graph of which this relationship is a part, or NULL if not part of a graph |
[in] | rel | The relationship to query |
[in] | nm | The name of the property to find |
WString Fmt | ( | ) | const |
Formats the error information.
WString Fmt | ( | ) | const |
Format current object.
FmtArgs | ( | DgnModelRefP | m | ) |
Generate a new FmtArgs from a DgnModelRefP.
WString Bentley::MstnPlatform::Relationship::fmtComponentProperties | ( | ElementHandleCR | ehandle | ) |
Format the component properties in GlobalVariableDictionary.
[in] | ehandle | The ElementHandle to use |
WString Bentley::MstnPlatform::Relationship::fmtElementProperties | ( | ElementHandleCR | ehandle | ) |
Format the element properties.
[in] | ehandle | The ElementHandle to use |
WString Bentley::MstnPlatform::Relationship::fmtElementRef | ( | ElementRefP | ref | ) |
Format element.
[in] | ref | The ElementRef to format |
WString Bentley::MstnPlatform::Relationship::fmtElementRef3 | ( | ElementRefP | ref | ) |
Format element without showing internal name.
[in] | ref | The ElementRef to format |
WString Bentley::MstnPlatform::Relationship::fmtElementRef4 | ( | ElementRefP | ref | ) |
Format element with showing internal name.
[in] | ref | The ElementRef to format |
WString Bentley::MstnPlatform::Relationship::fmtRelationshipStatus | ( | Relation const & | rel | ) |
Format the status of relationship.
[in] | rel | The Relation to use |
WString FmtType | ( | ) | const |
WString FmtUnits | ( | ) | const |
Formats current units.
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.
OperandToken const* GetBase | ( | ) | const |
Get current operand token.
TokenClsId GetClsId | ( | ) | const |
Get current TokenClsId.
UInt16 GetCount | ( | ) | const |
Gets the size of current array.
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.
StatusInt GetData | ( | IPersistentParameterData & | pd | ) |
Gets the additional data for this parameter.
[out] | pd | An IPersistentParameterData used to store the additional data |
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.
DeepCopyOption GetDeepCopyOption | ( | ) | const |
Check if root should be deep-copied when the relation that owns this moniker is copied.
Get description of the specified relationship.
[in] | handler | A pointer to an IHandler to use |
[in] | rec | The relationship to get description |
WString GetDescription | ( | ) | const |
Gets the description of current iterator.
WString GetDescription | ( | ) | const |
Get a brief description of the moniker.
WString GetDescription | ( | Relation const & | rel | ) |
Provide a brief description of the relationship.
Description is used in path info strings, among other places
[in] | rel | The relationship to query |
GlobalVariableDictionaryChain& GetDictionaryChain | ( | ) | const |
Get the global variable dictionary chain to be used to resolve identifiers in the expression.
StatusInt GetElementConnections | ( | ElementRefVector * | inputTo, |
ElementRefVector * | outputFrom, | ||
ElementRefP | elRef | ||
) |
Query the relations to which the specified element is connected.
[in] | inputTo | Optional: relationships to which element is an input |
[in] | outputFrom | Optional: relationship(s) from which element is an output |
[in] | elRef | Element to look up |
ElementNodeInfo GetElementNodeInfo | ( | ElementRefP | ) |
Query information about the specified element as a node in the graph.
ElementPropertyMap const* GetElementProperties | ( | ) | const |
Query the property references used by the expression.
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.
[in] | targetElement | The element containing the property. |
[in] | propName | The name of the property on the target element |
[in] | base | The operand whose property is being queried |
EditElementHandleR GetElemHandle | ( | ) | const |
Get the element handle of the relationship element itself.
EvaluateMode GetEvaluateMode | ( | ) | const |
Query the purpose of evaluation.
IExpression const* GetExpression | ( | ) | const |
Get current expression.
IExpression const* GetExpression | ( | ) | const |
UInt64 GetFirstDirectChange | ( | ) |
Get the first direct change.
IGraphEvaluation* GetGraph | ( | ) | const |
Get current graph.
IGraphEvaluation* GetGraphEvaluation | ( | ) | const |
Query the graph evaluation context in which Evaluate is called.
DgnPlatform::ElementHandle GetGvElement | ( | ) | const |
Gets GV element.
WChar const* GetGvName | ( | ) | const |
Gets current GV name.
Relation* GetGvRelation | ( | ) | const |
Gets GV relation.
IHandler* GetHandler | ( | Relation const & | rel | ) |
Find the relationship handler for the specified relationship.
[in] | rel | The relationship to find |
HandlerPrivateIdPart GetHandlerPrivateIdPart | ( | ) | const |
Query relationship handler's private value Note: handler private key part is meaningful only to the relationship handler.
HandlerPublicIdPart GetHandlerPublicIdPart | ( | ) | const |
Query relationship's relationship handler.
DgnModelRefP GetHomeModelRefP | ( | ) | const |
ParameterId GetId | ( | ) | const |
Gets current parameter Id to query.
OperandToken* GetItem | ( | UInt16 | i | ) | const |
Gets item at a given index.
[in] | i | The position of the item to get at |
OperandToken* GetItemByIndex | ( | ExprErrorDetails * | error, |
OperandToken const * | indexValue | ||
) | const |
Gets item by a given index.
[out] | error | A pointer to an ExprErrorDetails used to store the error information if there is any problem |
[in] | indexValue | The given index |
ExprErrorDetails const& GetLastError | ( | ) | const |
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.
Moniker GetMoniker | ( | ) |
Query this parameter's element reference.
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.
MonikerTargetStatus GetMonikerStatus | ( | MonikerIterator & | it | ) | const |
Is parameter data item dirty?
[in] | it | The moniker iterator to get the status from |
|
static |
Gets a static IParserOperatorFactory.
|
static |
Gets a static IParserOperatorFactory.
StatusInt GetPaths | ( | DisplayPathPtr & | path1, |
DisplayPathPtr & | path2 | ||
) |
Get one or both target elements.
[out] | path1 | A reference to a DisplayPathPtr |
[out] | path2 | A reference to a DisplayPathPtr |
StatusInt GetPersistentParameter | ( | IPersistentParameterData & | data | ) | const |
Get the custom parameter data associated with the current parameter.
[out] | data | An IPersistentParameterData used to store the persistent parameters |
IOperandValueStorage* GetProperty | ( | ExprErrorDetails * | error, |
WChar const * | name | ||
) | const |
Gets property by name.
[out] | error | A pointer to an ExprErrorDetails used to store the error information if there is any problem |
[in] | name | The name of the property to get |
WChar const* GetPropertyName | ( | ) | const |
Get current property name.
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.
[in] | errorDetails | If NULL is returned, the property holder should return an error status value here. The value should be one of:
|
[in] | graph | Optional: If the relation is part of a graph, this is the graph |
[in] | rel | The relationship to query |
[in] | propId | The property to access |
DgnModelRefP GetReferenceToModel | ( | DgnModelRefP | targetModel | ) |
Get (or create) a reference attachment from this tempfile to targetModel.
StatusInt GetRelationshipConnections | ( | ElementRefVector * | inputs, |
ElementRefVector * | outputs, | ||
Relation const & | rel | ||
) |
Query the elements to which the specified relation is connected.
[in] | inputs | Optional: inputs to relationship |
[in] | outputs | Optional: outputs of relationship |
[in] | rel | Relationship to look up |
RelationshipNodeInfo GetRelationshipNodeInfo | ( | Relation const & | ) |
Query information about the specified relationship as a node in the graph.
void GetRelationshipsInTopologicalOrder | ( | ElementRefVector & | rels | ) |
Get the list of relationships to be reevaluated, in topological order.
[in] | rels | Vector 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.
[out] | relsInBlock | Relations that were removed by the call to RemoveRelationshipsAndSubstituteBlock |
[in] | blockRel | A relation that was passed to RemoveRelationshipsAndSubstituteBlock |
void GetRelationshipsThatDependOnElement | ( | ElementRefVector & | connectedRels, |
ElementRefP | elRef | ||
) |
Query the relationships that (might) use the specified element.
[in] | connectedRels | The list of relations that (might) depend on elRef |
[in] | elRef | The 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.
[in] | rels | The list of relations that (might) Input the GV |
[in] | graph | The graph that will be used to analyze GV connections. |
[in] | iGv | The global variable |
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.
[in] | rels | The list of relations that (might) Output the GV |
[in] | graph | The graph that will be used to analyze GV connections. |
[in] | iGv | The global variable |
Gets the units of result.
[out] | resu | A pointer to an Units used to store the resulting units |
[in] | lu | An Units |
[in] | ru | An Units |
[in] | op | An OpCode |
State GetState | ( | ) | const |
Query what the graph evaluator is currently doing.
RelationStatus GetStatus | ( | ) | const |
Get current status.
WString GetStatusDetails | ( | ) | const |
Gets the details of status.
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.
[in] | rel | The relationship to query |
WString GetStatusDetails | ( | Relation const & | rel | ) |
Get the details of status.
[in] | rel | The relationship to use |
DgnPlatform::ElementHandle GetTargetElement | ( | ) | const |
Get the target element.
DgnPlatform::ElementHandle GetTargetElement | ( | ) | const |
Gets target element.
DgnPlatform::ElementHandle GetTargetElement | ( | ) | const |
Gets target element.
void GetTargets | ( | ElementRefVector & | targets, |
Relation const & | rel | ||
) |
Query the targets of the specified relationship.
[in] | targets | The vector to fill out |
[in] | rel | The relationship to find |
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.
[out] | tempEh | New or existing element that is associated with the specified baseElement by name |
[in] | baseElement | The element to which the temporary is related (e.g., as a property of the host) |
[in] | tempName | A name to assign to the temporary element (e.g., a property name) |
StatusInt GetTemporaryElementBase | ( | ElementRefP & | baseRef, |
ElementRefP | tempElem | ||
) |
Get the base element assigned to the temporary element when it was created.
[out] | baseRef | The base element assigned to this temporary element when it was created. |
[in] | tempElem | Temporary element to query |
StatusInt GetTemporaryElementName | ( | WStringR | name, |
ElementRefP | tempElem | ||
) |
Get the description assigned to the temporary element when it was created.
[out] | name | The description assigned to tempElem when it was created |
[in] | tempElem | Temporary element to query |
ElementRefP GetTempPropRef | ( | ) | const |
Get the temp property element ref.
ElementRefP GetTempPropRef | ( | ElementRefP | baseElement, |
WChar const * | propName | ||
) |
Short hand for:
Token* GetTokenInRpnRelativeToCurrent | ( | int | i | ) | const |
Get token in the token vector at a given index.
[in] | i | The given index |
DgnPlatform::ElementHandle Bentley::MstnPlatform::Relationship::getTopLevelElement | ( | ElementHandleCR | elem | ) |
Get the top level element handle.
[in] | elem | The ElementHandle to use |
ElementRefP Bentley::MstnPlatform::Relationship::getTopLevelElement | ( | ElementRefP | ref | ) |
Get the top level element ref.
[in] | ref | The ElementRef to use |
int GetTraceLevel | ( | ) | const |
Units GetUnits | ( | ) | const |
Gets the units of current operand.
OperandToken* GetValue | ( | ExprErrorDetails * | error | ) | const |
Get an OperandToken from an ExprErrorDetails.
[in] | error | A pointer to an ExprErrorDetails |
OperandToken* GetValue | ( | StatusInt * | errorDetails, |
ElementHandleCR | eh | ||
) |
Query the property's value.
[out] | errorDetails | If NULL is returned, the property holder should return an error status value here. The value should be one of:
|
[in] | eh | The ElementHandle to use |
OperandToken* GetValue | ( | ExprErrorDetails * | error | ) | const |
Gets current operand token.
[out] | error | A pointer to an ExprErrorDetails used to store the error information if there is any problem |
OperandToken* GetValueAs | ( | ExprErrorDetails * | error, |
const type_info & | typeWanted | ||
) | const |
Gets current operand token.
[out] | error | A pointer to an ExprErrorDetails used to store the error information if there is any problem |
[in] | typeWanted | The type to get as |
Referenced by Bentley::MstnPlatform::Relationship::tokenOperand_cast(), and Bentley::MstnPlatform::Relationship::tokenOperand_checkType().
IOperandValueStorage* GetValueStorage | ( | ) | const |
Gets current operand value storage.
void Bentley::MstnPlatform::Relationship::graphEvaluation_test | ( | ) |
Test graph evaluation.
|
explicit |
Generates a GvValue by an IExpression.
|
explicit |
Generates a GvValue by an IExpression and name.
|
explicit |
Generates a GvValue by an IExpression, a name and a GlobalVariableDictionaryChain.
bool HasData | ( | ) |
Does this parameter have additional data?
bool HasMoniker | ( | ) |
Does this parameter represent a reference to another element? See Relation for methods to add/delete monikers.
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()
[in] | pid | A ParameterId |
bool HasTwoPaths | ( | ) | const |
Query if the moniker has two paths.
This happens when a moniker is based on an intersection snap.
IGraphManagerEventHandler | ( | ) |
Constructor.
|
explicit |
Generates an index operator.
|
explicit |
Generates an Int64Value with a default value(0)
|
explicit |
Generates an Int64Value with a given value.
|
explicit |
Generates an IntValue with a default value(0)
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.
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
.
[in] | graph | Optional: the graph of which this relationship is a part |
[in] | rel | The relationship to query |
bool IsComponent | ( | ElementHandleCR | eh | ) |
Check if the specified element is a cell that contains relationships.
bool IsDictionaryElement | ( | ElementHandleCR | eh | ) |
Check if the specified element is a global variable dictionary or expression table.
bool IsEqualValue | ( | OperandToken * | rhs | ) | const |
Gets if current operand is equal with the given one.
[in] | rhs | The given operand to compare with |
|
static |
Gets if an operator code is logical.
[in] | opCode | An OpCode |
|
static |
Gets if an operator code is logical.
[in] | opCode | An OpCode |
bool IsOpenOnElement | ( | bool | evenIfDeleted = false | ) | const |
Query if relationship was detected on host element.
[in] | evenIfDeleted | If the relationship has been deleted or not |
bool IsOutputOfAny | ( | ElementRefP | ) | const |
Query if there is any output information.
bool IsParameterDataItemDirty | ( | ParameterDataItemIterator & | it | ) | const |
Is parameter data item dirty?
[in] | it | An iterator pointing to the specified parameter |
bool IsReevaluationDisabled | ( | ) | const |
Check if reevaluation is disabled.
bool IsRelationshipElement | ( | ElementHandleCR | eh | ) |
Check if the specified element is a relationship element, i.e., if it has a Relation XAttribute.
bool IsResolved | ( | ExprErrorDetails * | e = 0 | ) | const |
Is the target property resolved?
[out] | e | The error information if not resolved |
bool IsResolved | ( | ExprErrorDetails * | e = 0 | ) | const |
Gets if current GV value is resolved or not.
[out] | e | A pointer to an ExprErrorDetails used to store error information if there is any problem |
bool IsSatisfied | ( | IGraphEvaluation * | graph, |
Relation const & | rel | ||
) |
The handler should check if the relationship is satisfied.
[in] | graph | Optional: the graph of which this relationship is a part |
[in] | rel | The relationship to check |
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
bool IsTargetAvailable | ( | ) | const |
Query if all targets can be found.
bool IsTargetAvailable | ( | ) |
Query if the target is available, i.e., resolved and not deleted.
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.
bool IsUpToDate | ( | ) | const |
Test if no change flags are set => the relationship is up to date.
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.
|
explicit |
Generates a LcsValue with a default value(NULL)
|
explicit |
|
static |
Query the factory registered to create Tokens associated with the specified clsid.
[in] | clsid | Identifier |
|
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.
|
explicit |
Initialize a Moniker that captures the specified DgnPlatform::PersistentSnapPath.
Moniker | ( | DgnModelRefP | home, |
DgnPlatform::AssocPoint const & | , | ||
DeepCopyOption | dco = DeepCopyOption_On |
||
) |
Initialize a Moniker that captures the specified DgnPlatform::AssocPoint.
Moniker | ( | DgnModelRefP | home, |
PersistentElementPathCR | , | ||
DeepCopyOption | dco = DeepCopyOption_On |
||
) |
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.
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().
[in] | graph | The graph to query |
void OnParameterChange | ( | Relation & | rel, |
ParameterId | pid, | ||
MonikerIterator & | miter, | ||
MonikerTargetStatus | change | ||
) |
Callback invoked when the target of a moniker has been changed.
[in] | rel | The relation |
[in] | pid | The parameter's ID |
[in] | miter | The target element that changed |
[in] | change | How 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.
[in] | rel | The relation |
[in] | pid | The parameter's ID |
[in] | miter | The target element that changed |
[in] | change | How the target element was changed |
void OnReevaluate | ( | IGraphEvaluation const & | graph | ) |
Called after each graph reevaluation.
[in] | graph | An IGraphEvaluation |
void OnReevaluationsFinished | ( | ) |
Called after all graph reevaluations are finished, including the reevaluation triggered by direct changes and all follow-up reevaluations triggered by discoveries.
void OnRelationshipAdded | ( | ElementRefP | ref, |
DgnModelRefP | model, | ||
bool | isUndoRedo | ||
) |
Called after relationship added.
[in] | ref | A pointer to an ElementRef to use |
[in] | model | A pointer to a DgnModelRef to query |
[in] | isUndoRedo | Is undo or redo |
void OnRelationshipChange | ( | Relation & | rel | ) |
Callback invoked when the relationship element itself has been added, changed, or deleted.
[in] | rel | The relation |
void OnRelationshipDeleted | ( | ElementRefP | ref, |
DgnModelRefP | model, | ||
bool | isUndoRedo | ||
) |
Called after relationship deleted.
[in] | ref | A pointer to an ElementRef to use |
[in] | model | A pointer to a DgnModelRef to query |
[in] | isUndoRedo | Is undo or redo |
StatusInt OnRelationshipTransformed | ( | Relation & | rel, |
TransformInfoCR | t | ||
) |
Callback invoked when the relationship element itself has been transformed.
[in] | rel | The relationship to query |
[in] | t | The TransformInfo to use |
void OnRelationshipUndoRedo | ( | Relation & | rel | ) |
Callback invoked when a add, change, or deletion of the relationship element itself has been undone or redone.
[in] | rel | The relation |
|
explicit |
|
explicit |
Generates an operand token.
Moniker& operator= | ( | Moniker const & | m | ) |
ExprErrorDetails& operator= | ( | ExprErrorDetails const & | e2 | ) |
Endow to current ExprErrorDetails with a given one.
[in] | e2 | The given ExprErrorDetails |
|
explicit |
|
explicit |
|
explicit |
Generates an OrientationValue with a default value(NULL)
|
explicit |
Generates an OrientationValue with a given value.
ParameterQuery | ( | Relation const & | , |
ParameterId | |||
) |
ParameterQuery | ( | Relation const & | , |
ElementRefP | |||
) |
ParameterQueryRW | ( | Relation & | , |
ParameterId | |||
) |
|
explicit |
Generates a PointValue with a default one(NULL)
|
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.
[in] | cell | The cell to use |
[in] | callback | The callback to invoke |
[in] | arg2 | Add an argument to callback |
int ProcessRelationshipsInModel | ( | DgnModelRefP | modelRef, |
ProcessRelationshipsInModelCallback * | callback, | ||
void * | arg2, | ||
UShort const * | types = 0 , |
||
UShort | sizeofTypes = 0 |
||
) |
Invoke callback on each relationship in the specified model.
[in] | modelRef | The model to use |
[in] | callback | The callback to invoke |
[in] | arg2 | Add an argument to callback |
[in] | types | OPTIONAL: array of TMSKXXX masks, as for scanning |
[in] | sizeofTypes | The number of bytes of data pointed to by types |
_types[0] = TMSK0_CELL_HEADER; _types[6] = TMSK6_EXTENDED|TMSK6_EXTENDED_NONGRAPHIC_ELM;
void RecordFirstDirectChange | ( | UInt64 | i | ) |
Record the first direct change.
[in] | i | An UInt64 value |
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.
[in] | graph | An IGraphEvaluation |
[in] | rel | The relation |
void Reevaluate | ( | GraphBuildingOptions | gbOptions = GBOPTIONS_DeferEnterGraph | ) |
Reevaluate all relationships affected by direct changes and all relationships affected indirectly by them.
[in] | gbOptions | Options to control graph-building |
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.
[in] | graph | Optional: the graph of which this relationship is a part |
[in] | rel | The relationship to update |
void RegisterEventHandler | ( | IGraphManagerEventHandler * | eventHandler | ) |
Register a relationship event-handler.
[in] | eventHandler | The event handler |
IHandler* RegisterHandler | ( | HandlerPublicIdPart | pubid, |
HandlerPrivateIdPart | privid, | ||
IHandler * | handler | ||
) |
Register an relationship handler by the specified Id.
[in] | pubid | The public part of the handler's unique ID. This must be a value allocated from the XAttributeHandlerMajorIDs value space. |
[in] | privid | The private part of the handler's unique ID. This value can be anything. |
[in] | handler | The handler |
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.
[in] | h | The IRelationDependencyHelper to register |
|
static |
Register a factory to create Tokens associated with the specified clsid.
[in] | clsid | Identifier |
[in] | handler | The Factory |
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.
[in] | edh | The EditElementHandle to use |
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.
[in] | crel | The relationship to get monikers from |
WString Bentley::MstnPlatform::Relationship::relationshipDebug_getDefaultRelationshipDesc | ( | Relation const & | rel | ) |
Get the description of default relationship.
[in] | rel | The relationship to use |
void Bentley::MstnPlatform::Relationship::relationshipDebug_registerTiming | ( | ITiming * | tm | ) |
Register timing.
[in] | tm | The ITiming to register |
void Bentley::MstnPlatform::Relationship::relationshipDebug_unRegisterTiming | ( | ITiming * | tm | ) |
Unregister timing.
[in] | tm | The ITiming to remove |
RelationshipPropertyAccess | ( | IHandler * | , |
IGraphEvaluation * | graph, | ||
UInt32 | propId | ||
) |
void Release | ( | ) |
Subtract one from ref count.
void Release | ( | ) |
Subtract one from ref count.
void ReleaseToken | ( | ) |
Releases current token.
void RemoveElement | ( | ElementRefP | elRef | ) |
Remove the specified element from the graph.
[in] | elRef | Element to remove |
void RemoveFirstDirectChange | ( | ) |
Remove the first direct change.
void RemoveInput | ( | Relation const & | rel, |
ElementRefP | elRef | ||
) |
Remove el as an input to rel.
[in] | rel | Relationship to modify |
[in] | elRef | Element to remove from relationship's input list |
Remove the element identified by the specified moniker from the inputs of the relation.
StatusInt RemoveItem | ( | UInt16 | i | ) |
Removes an item from current array.
[in] | i | The position of the item to remove at |
void RemoveOutput | ( | Relation const & | rel, |
ElementRefP | el | ||
) |
Remove el as an output of rel.
[in] | rel | Relationship to modify |
[in] | el | Element to remove from relationship's output list |
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.
[in] | rel | Relationship to remove |
[in] | suppress | Mark the relationship as suppressed? |
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.
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:
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.
[in] | blockRel | The simultaneous block relationship |
[in] | relsInBlock | The relationships to go into the block |
StatusInt Resolve | ( | ExprErrorDetails * | e | ) | const |
Resolves current GV value.
[out] | e | A pointer to an ExprErrorDetails used to store error information if there is any problem |
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.
[in] | ehandle | The element to be saved |
StatusInt SavePropertyChanges | ( | IGraphEvaluation * | graph, |
Relation & | rel | ||
) |
One or more calls to SetPropertyValue have been made.
Now is the time to commit these changes
[in] | graph | Optional: If the relation is part of a graph, this is the graph |
[in] | rel | The relationship to query |
void SetDeepCopyOption | ( | DeepCopyOption | option | ) |
Specify if root should be deep-copied when the relation that owns this moniker is copied.
[in] | option | The type of deep-copying |
void SetExpression | ( | IExpression const * | expression | ) |
void SetGraphBuildingOptions | ( | GraphBuildingOptions | o, |
bool | set | ||
) |
Set graph building options.
[in] | o | A GraphBuildingOptions |
[in] | set | A bool value |
void SetHandlerPrivateIdPart | ( | HandlerPrivateIdPart | aid | ) |
Set relationship handler's value Note: a handler private key part is meaningful only to the relationship handler.
[in] | aid | A HandlerPrivateIdPart |
void SetHandlerPublicIdPart | ( | HandlerPublicIdPart | aid | ) |
Set relationship's relationship handler.
[in] | aid | A HandlerPublicIdPart |
void SetHomeModelRef | ( | DgnModelRefP | m | ) |
Set the home model ref.
[in] | m | A pointer to a DgnModelRef |
void SetMonikerStatus | ( | MonikerIterator & | it, |
MonikerTargetStatus | status | ||
) |
Set/clear moniker target change status.
[in] | it | The moniker iterator to get the status from |
[in] | status | A MonikerTargetStatus |
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
[out] | pq | A ParameterQuery in which the status will be changed |
void SetParameterDataItemDirty | ( | ParameterDataItemIterator & | it, |
bool | d | ||
) |
Set/clear parameter data item dirty status.
[in] | it | An iterator pointing to the specified parameter |
[in] | d | A bool value to endow to the specified parameter item dirty status |
StatusInt SetPropertyValue | ( | IGraphEvaluation * | graph, |
Relation & | rel, | ||
UInt32 | propId, | ||
OperandToken const & | newValue | ||
) |
Set a relationship property value.
[in] | graph | Optional: If the relation is part of a graph, this is the graph |
[in] | rel | The relationship to query |
[in] | propId | The property to access |
[in] | newValue | The new value to use |
void SetSkipRelativeToCurrent | ( | int | startSkip, |
int | nSkip | ||
) | const |
Set skipping section.
[in] | startSkip | The start skipping number used to set the beginning of current expression |
[in] | nSkip | The skipping span used to set the tail of current expression |
void SetStatusFlag | ( | RelationStatus | flagToTurnOn | ) |
Set the specified status flags.
[in] | flagToTurnOn | A RelationStatus |
void SetTraceLevel | ( | int | level, |
FILE * | fp | ||
) |
Set the trace level.
[in] | level | The trace level. 0 means no tracing. |
[in] | fp | Where to write trace messages. NULL for stdout. |
void SetUpToDate | ( | ) |
Clear all change flags => the relationship is up to date.
ExprErrorDetails SetValue | ( | OperandToken * | token | ) |
Set error details with a token.
[in] | token | A pointer to an OperandToken |
StatusInt SetValue | ( | EditElementHandleR | , |
OperandToken const & | newValue | ||
) |
Update the property's value.
[in] | newValue | The new value for the property |
void SetValueStorage | ( | IOperandValueStorage const * | val | ) |
Sets current operand value storage.
[in] | val | A const pointer to an IOperandValueStorage |
|
pure virtual |
StdBinOp | ( | IExpression const * | ) |
Generates a default binary operation.
|
explicit |
Generates a binary operator with a given operator code.
StdUnOp | ( | IExpression const * | ) |
Generates a default unary operator.
|
explicit |
Generates an unary operator with a given operator code.
|
explicit |
Generates a default StringValue (NULL)
|
explicit |
Generates a StringValue with a given string.
StatusInt Bentley::MstnPlatform::Relationship::stripAllMonikerXas | ( | Relation & | rel | ) |
Strip all moniker XAttributes for the specified relationship.
[in] | rel | The Relation to strip |
StatusInt Bentley::MstnPlatform::Relationship::stripAllRelationshipXas | ( | Relation & | rel | ) |
TempFile | ( | ) |
Token | ( | ) |
Generate an object of Token.
|
explicit |
Generates a TokenLoader with an IExpression.
|
explicit |
Generates a TokenLoader with an IExpression, a Token and a bool value which represents if add ref for this token or not.
|
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.
[in] | flag | A RelationStatus |
UnOpCode | ( | TokenClsId | c, |
UInt16 | o | ||
) |
void UnRegisterEventHandler | ( | IGraphManagerEventHandler * | eventHandler | ) |
Un-register an event-handler.
[in] | eventHandler | The handler to remove |
void UnRegisterHandlerStar | ( | HandlerPublicIdPart | pubid | ) |
Un-register all relationship handlers with the specified public id part.
[in] | pubid | The public part of the handler's unique ID |
void UnRegisterIRelationDependencyHelper | ( | IRelationDependencyHelper * | h | ) |
Un-register an IRelationDependencyHelper.
[in] | h | The IRelationDependencyHelper to remove |
|
static |
Un-register the Token factory registered under this clsid.
[in] | clsid | Identifier |
StatusInt UpdateData | ( | IPersistentParameterData const & | pd | ) |
Updates the custom data associated with the specified parameter.
[out] | pd | An IPersistentParameterData used to store the updated data |
StatusInt UpdateMoniker | ( | Moniker const & | moniker | ) |
Updates current moniker.
[in] | moniker | A Moniker used to update the current one |
StatusInt UpdateMoniker | ( | MonikerIterator & | mIter, |
Moniker const & | moniker | ||
) |
Update the moniker associated with the specified parameter.
[in] | mIter | A MonikerIterator |
[in] | moniker | A const reference to a Moniker used to update the moniker associated with the specified parameter |
StatusInt UpdateParameterDataItem | ( | ParameterDataItemIterator & | it, |
IPersistentParameterData const & | pd | ||
) |
Update the custom data associated with the specified parameter.
[in] | it | An iterator pointing to the specified parameter |
[in] | pd | The custom data to associate with the parameter |
|
explicit |
Generates a VectorValue with a default value(NULL)
|
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.
[in] | e1 | An element |
[in] | e2 | Another element |
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.
[in] | changedEls | List of elements that changed (hypothetically) |
[in] | changedRels | List of relationships that were changed directly (hypothetically) |
IGraphEvaluationPtr WhatIfChanged | ( | ElementRefVector const & | changedEls, |
ElementRefVector const & | changedRels, | ||
GraphBuildingOptions | gbOptions = GBOPTIONS_DeferEnterGraph |
||
) |
Evaluates what would happen if the specified element were changed.
[in] | changedEls | List of elements that changed (hypothetically) |
[in] | changedRels | List of relationships that were changed directly (hypothetically) |
[in] | gbOptions | Options to control graph-building |
StatusInt Bentley::MstnPlatform::Relationship::writeXaChanges | ( | EditElementHandleR | eh | ) |
Write XAttribute changes.
[in] | eh | The EditElementHandle to use |
|
virtual |
Destructor.
|
virtual |
Destructor.
|
virtual |
Destructor.
|
virtual |
Destructor.
~ExprErrorDetails | ( | ) |
Destructor.
|
virtual |
Destructor.
|
virtual |
Destructor.
|
virtual |
Virtual desctructor.
|
virtual |
Virtual destructor.
|
virtual |
Destructor.
|
virtual |
|
virtual |
Destructor.
~ParameterQuery | ( | ) |
~Relation | ( | ) |
Clean up.
|
virtual |
Destructor.
|
virtual |
|
virtual |
Destructor.
~TokenLoader | ( | ) |
Destructor.
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 |
|
static |
A static member of ExprErrorDetails.
UInt16 opCode |
UInt16 opCode |
|
static |
|
static |
Token const* token1 |
Token const* token2 |
WString whatFailed |