MeshKit  1.0
AF2Binding Class Reference

#include <AF2Binding.hpp>

List of all members.

Classes

struct  VtxBindRec

Public Member Functions

void bind (const AF2RuleExistEdge *ruleEdgePtr, const AF2Edge2D *ngbhdEdgePtr)
 Bind a rule edge to a neighborhood edge.
void bind (const AF2RuleExistVertex *ruleVertexPtr, const AF2Point2D *ngbhdVertexPtr)
 Explicitly bind a rule vertex to a neighborhood vertex.
const AF2Point2DgetBoundValue (const AF2RuleExistVertex *ruleVertexPtr) const
 Retrieve the neighborhood vertex to which a rule vertex is bound.
bool isConsistent (const AF2RuleExistEdge *ruleEdgePtr, const AF2Edge2D *ngbhdEdgePtr) const
 Check whether binding a rule edge to a neighborhood edge is consistent with this AF2Binding's current bindings.
bool isConsistent (const AF2RuleExistVertex *ruleVertexPtr, const AF2Point2D *ngbhdVertexPtr) const
 Check whether binding a rule vertex to a neighborhood vertex is consistent with this AF2Binding's current bindings.
void release (const AF2RuleExistEdge *ruleEdgePtr)
 Release the binding of the specified rule edge to whatever neighborhood edge it is bound to.
void release (const AF2RuleExistVertex *ruleVertexPtr)
 Release the explicit binding of the specified rule vertex to whatever neighborhood vertex the rule vertex is bound to.

Private Member Functions

void bind (const AF2RuleExistVertex *ruleVertexPtr, const AF2Point2D *ngbhdVertexPtr, bool isExplicit)
 Bind a vertex.
void release (const AF2RuleExistVertex *ruleVertexPtr, bool isExplicit)
 Release a vertex binding.

Private Attributes

std::map< const
AF2RuleExistVertex
*, VtxBindRec
vertexBindMap
std::set< const AF2Point2D * > verticesInUse
std::map< const
AF2RuleExistEdge *, const
AF2Edge2D * > 
edgeBindMap
std::set< const AF2Edge2D * > edgesInUse

Detailed Description

Definition at line 41 of file AF2Binding.hpp.


Member Function Documentation

void bind ( const AF2RuleExistVertex ruleVertexPtr,
const AF2Point2D ngbhdVertexPtr,
bool  isExplicit 
) [private]

Bind a vertex.

Parameters:
isExplicitdifferentiate between binding a vertex due to an explicit method call from a user and binding a vertex implicitly because it is an endpoint of an edge

Definition at line 68 of file AF2Binding.cpp.

void bind ( const AF2RuleExistEdge ruleEdgePtr,
const AF2Edge2D ngbhdEdgePtr 
)

Bind a rule edge to a neighborhood edge.

Binds a rule edge to a neighborhood edge and implicitly binds the rule vertices that are endpoints of the rule edge to the neighborhood vertices that are endpoints of the neighborhood edge. If binding the edge is not consistent, this method will throw an exception. The consistency of the binding can be checked before attempting the binding by calling the isConsistent method.

This method does not take ownership of the pointers passed into it. The calling context must ensure that the pointers remain valid as long as this AF2Binding (or any copy of it) is in use.

Parameters:
ruleEdgePtra pointer to the rule edge that should be bound
ngbhdEdgePtra pointer to the neighborhood edge to which the rule edge should be bound

Definition at line 15 of file AF2Binding.cpp.

void bind ( const AF2RuleExistVertex ruleVertexPtr,
const AF2Point2D ngbhdVertexPtr 
)

Explicitly bind a rule vertex to a neighborhood vertex.

Explicitly binds a rule vertex to a neighborhood vertex, even if the rule vertex is already implicitly bound to the neighborhood vertex. If binding the vertex is not consistent, this method will throw an exception. The consistency of the binding can be checked before attempting the binding by calling the isConsistent method.

This method does not take ownership of the pointers passed into it. The calling context must ensure that the pointers remain valid as long as this AF2Binding (or any copy of it) is in use.

Parameters:
ruleVertexPtra pointer to the rule vertex that should be bound
ngbhdVertexPtra pointer to the neighborhood vertex to which the rule vertex should be bound

Definition at line 62 of file AF2Binding.cpp.

const AF2Point2D * getBoundValue ( const AF2RuleExistVertex ruleVertexPtr) const

Retrieve the neighborhood vertex to which a rule vertex is bound.

If the rule vertex is bound to a neighborhood vertex implicitly, explicitly, or both implicitly and explicitly, this method will return a pointer to the neighborhood vertex that the rule vertex is bound to. If the rule vertex is not bound to any neighborhood vertex, this method will return a null pointer.

Parameters:
ruleVertexPtra pointer to the rule existing vertex for which to retrieve the bound value
Returns:
a pointer to the neighborhood vertex to which the rule existing vertex is bound, or a null pointer if rule veretx is not bound to any neighborhood vertex

Definition at line 123 of file AF2Binding.cpp.

bool isConsistent ( const AF2RuleExistEdge ruleEdgePtr,
const AF2Edge2D ngbhdEdgePtr 
) const

Check whether binding a rule edge to a neighborhood edge is consistent with this AF2Binding's current bindings.

Binding an edge may be inconsistent for any of the following reasons. (1) The AF2Binding may have the rule edge bound to some other neighborhood edge. (2) The AF2Binding may have some other rule edge bound to the neighborhood edge. (3) There may be an inconsistency in binding one of the endpoints of the edge. See the isConsistent method for checking consistency of binding a rule vertex to a neighborhood vertex.

Parameters:
ruleEdgePtra pointer to a rule edge
ngbhdEdgePtra pointer to a neighborhood edge
Returns:
true if binding the rule edge to the neighborhood edge is consistent with this AF2Binding's current bindings; false otherwise

Definition at line 140 of file AF2Binding.cpp.

bool isConsistent ( const AF2RuleExistVertex ruleVertexPtr,
const AF2Point2D ngbhdVertexPtr 
) const

Check whether binding a rule vertex to a neighborhood vertex is consistent with this AF2Binding's current bindings.

Binding the specified rule vertex to the specified neighborhood vertex may be inconsistent for any of the following reasons. (1) The AF2Binding may have the rule vertex bound to some other neighborhood vertex. (2) The AF2Binding may have some other rule vertex bound to the neighborhood vertex.

Parameters:
ruleVertexPtra pointer to a rule vertex
ngbhdVertexPtra pointer to a neighborhood vertex
Returns:
true if binding the rule vertex to the neighborhood vertex is consistent with this AF2Binding's current bindings; false otherwise

Definition at line 177 of file AF2Binding.cpp.

void release ( const AF2RuleExistVertex ruleVertexPtr,
bool  isExplicit 
) [private]

Release a vertex binding.

Parameters:
isExplicitdifferentiate between releasing a vertex due to an explicit method call from a user and releasing an implicit binding of the vertex due to the vertex being an endpoint of an edge that is being released

Definition at line 236 of file AF2Binding.cpp.

void release ( const AF2RuleExistEdge ruleEdgePtr)

Release the binding of the specified rule edge to whatever neighborhood edge it is bound to.

Release the binding of the specified rule edge and release the implicit binding of the rule vertices that are endpoints of the rule edge. Releasing the endpoints will completely release an endpoint's vertex binding only if the vertex is not explicitly bound and there are no other bound edges that share the endpoint.

This method will throw an exception if the rule edge is not bound to a neighborhood edge.

Parameters:
ruleEdgePtra pointer to the rule edge for which to release the binding

Definition at line 213 of file AF2Binding.cpp.

void release ( const AF2RuleExistVertex ruleVertexPtr)

Release the explicit binding of the specified rule vertex to whatever neighborhood vertex the rule vertex is bound to.

This method will throw an exception if the specified rule vertex is not bound to any neighborhood vertex or if the vertex is only implicitly bound to a neighborhood vertex because it is the endpoint of one or more rule edges that are bound to neighborhood edges.

Parameters:
ruleVertexPtra pointer to the rule vertex for which to release the explicit binding

Definition at line 231 of file AF2Binding.cpp.


Member Data Documentation

std::map<const AF2RuleExistEdge*, const AF2Edge2D*> edgeBindMap [private]

Definition at line 59 of file AF2Binding.hpp.

std::set<const AF2Edge2D*> edgesInUse [private]

Definition at line 60 of file AF2Binding.hpp.

std::map<const AF2RuleExistVertex*, VtxBindRec> vertexBindMap [private]

Definition at line 57 of file AF2Binding.hpp.

std::set<const AF2Point2D*> verticesInUse [private]

Definition at line 58 of file AF2Binding.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines