OCC Main Page | ApplicationFramework | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ApplicationFramework
TKLCAF
TDataStd


TDataStd_Constraint Class Reference

The groundwork to define constraint attributes.
The constraint attribute contains the following sorts of data:
- Type whether the constraint attribute is a
geometric constraint or a dimension
- Value the real number value of a numeric
constraint such as an angle or a radius
- Geometries to identify the geometries
underlying the topological attributes which
define the constraint (up to 4)
- Plane for 2D constraints.
.

#include <TDataStd_Constraint.hxx>

Inheritance diagram for TDataStd_Constraint:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT TDataStd_Constraint ()
Standard_EXPORT void Set (const TDataStd_ConstraintEnum type, const Handle(TNaming_NamedShape)&G1)
 Finds or creates the constraint attribute defined
by the topological attribute G1 and the constraint type type.
.
Standard_EXPORT void Set (const TDataStd_ConstraintEnum type, const Handle(TNaming_NamedShape)&G1, const Handle(TNaming_NamedShape)&G2)
 Finds or creates the constraint attribute defined
by the topological attributes G1 and G2, and by
the constraint type type.
.
Standard_EXPORT void Set (const TDataStd_ConstraintEnum type, const Handle(TNaming_NamedShape)&G1, const Handle(TNaming_NamedShape)&G2, const Handle(TNaming_NamedShape)&G3)
 Finds or creates the constraint attribute defined
by the topological attributes G1, G2 and G3, and
by the constraint type type.
.
Standard_EXPORT void Set (const TDataStd_ConstraintEnum type, const Handle(TNaming_NamedShape)&G1, const Handle(TNaming_NamedShape)&G2, const Handle(TNaming_NamedShape)&G3, const Handle(TNaming_NamedShape)&G4)
 Finds or creates the constraint attribute defined
by the topological attributes G1, G2, G3 and G4,
and by the constraint type type.
//! methods to read constraint fields
=================================
.
Standard_EXPORT Standard_Boolean Verified () const
 Returns true if this constraint attribute is valid.
By default, true is returned.
When the value of a dimension is changed or
when a geometry is moved, false is returned
until the solver sets it back to true.
.
Standard_EXPORT TDataStd_ConstraintEnum GetType () const
 Returns the type of constraint.
This will be an element of the
TDataStd_ConstraintEnum enumeration.
.
Standard_EXPORT Standard_Boolean IsPlanar () const
 Returns true if this constraint attribute is
two-dimensional.
.
Standard_EXPORT const Handle_TNaming_NamedShape & GetPlane () const
 Returns the topological attribute of the plane
used for planar - i.e., 2D - constraints.
This plane is attached to another label.
If the constraint is not planar, in other words, 3D,
this function will return a null handle.
.
Standard_EXPORT Standard_Boolean IsDimension () const
 Returns true if this constraint attribute is a
dimension, and therefore has a value.
.
Standard_EXPORT const Handle_TDataStd_Real & GetValue () const
 Returns the value of a dimension.
This value is a reference to a TDataStd_Real attribute.
If the attribute is not a dimension, this value will
be 0. Use IsDimension to test this condition.
.
Standard_EXPORT Standard_Integer NbGeometries () const
 Returns the number of geometry attributes in this constraint attribute.
This number will be between 1 and 4.
.
Standard_EXPORT Handle_TNaming_NamedShape GetGeometry (const Standard_Integer Index) const
 Returns the integer index Index used to access
the array of the constraint or stored geometries of a dimension
Index has a value between 1 and 4.
//! methods to write constraint fields (use builder)
==================================
.
Standard_EXPORT void ClearGeometries ()
 Removes the geometries involved in the
constraint or dimension from the array of
topological attributes where they are stored.
.
Standard_EXPORT void SetType (const TDataStd_ConstraintEnum CTR)
 Finds or creates the type of constraint CTR.
.
Standard_EXPORT void SetPlane (const Handle(TNaming_NamedShape)&plane)
 Finds or creates the plane of the 2D constraint
attribute, defined by the planar topological attribute plane.
.
Standard_EXPORT void SetValue (const Handle(TDataStd_Real)&V)
 Finds or creates the real number value V of the dimension constraint attribute.
.
Standard_EXPORT void SetGeometry (const Standard_Integer Index, const Handle(TNaming_NamedShape)&G)
 Finds or creates the underlying geometry of the
constraint defined by the topological attribute G
and the integer index Index.
.
Standard_EXPORT void Verified (const Standard_Boolean status)
 Returns true if this constraint attribute defined by status is valid.
By default, true is returned.
When the value of a dimension is changed or
when a geometry is moved, false is returned until
the solver sets it back to true.
If status is false, Verified is set to false.
.
Standard_EXPORT void Inverted (const Standard_Boolean status)
Standard_EXPORT Standard_Boolean Inverted () const
Standard_EXPORT void Reversed (const Standard_Boolean status)
Standard_EXPORT Standard_Boolean Reversed () const
Standard_EXPORT const Standard_GUID & ID () const
 Returns the ID of the attribute.

.
Standard_EXPORT void Restore (const Handle(TDF_Attribute)&With)
 Restores the backuped contents from <anattribute>
into this one. It is used when aborting a
transaction.
.
Standard_EXPORT Handle_TDF_Attribute NewEmpty () const
 Returns an new empty attribute from the good end
type. It is used by the copy algorithm.
.
Standard_EXPORT void Paste (const Handle(TDF_Attribute)&Into, const Handle(TDF_RelocationTable)&RT) const
 This method is different from the "Copy" one,
because it is used when copying an attribute from
a source structure into a target structure. This
method may paste the contents of <me> into
<intoattribute>.

The given pasted attribute can be full or empty of
its contents. But don't make a NEW! Just set the
contents!

It is possible to use <arelocationtable> to
get/set the relocation value of a source
attribute.
.
virtual Standard_EXPORT Standard_OStream & Dump (Standard_OStream &anOS) const
 Dumps the minimum information about <me> on
<astream>.

.
virtual Standard_EXPORT void References (const Handle(TDF_DataSet)&DS) const
 Adds the first level referenced attributes and labels
to <adataset>.

For this, use the AddLabel or AddAttribute of
DataSet.

If there is none, do not implement the method.
.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Static Public Member Functions

static Standard_EXPORT const
Standard_GUID & 
GetID ()
 Returns the GUID for constraints.
.
static Standard_EXPORT Handle_TDataStd_Constraint Set (const TDF_Label &label)
 Finds or creates the 2D constraint attribute
defined by the planar topological attribute plane
and the label label.
//! Constraint methods
==================
.
static Standard_EXPORT void CollectChildConstraints (const TDF_Label &aLabel, TDF_LabelList &TheList)
 collects constraints on Childs for label <alabel>


Private Attributes

TDataStd_ConstraintEnum myType
Handle_TDataStd_Real myValue
Handle_TDF_Attribute myGeometries [4]
Handle_TDF_Attribute myPlane
Standard_Boolean myIsReversed
Standard_Boolean myIsInverted
Standard_Boolean myIsVerified

Constructor & Destructor Documentation

Standard_EXPORT TDataStd_Constraint::TDataStd_Constraint  ) 
 


Member Function Documentation

Standard_EXPORT void TDataStd_Constraint::ClearGeometries  ) 
 

static Standard_EXPORT void TDataStd_Constraint::CollectChildConstraints const TDF_Label aLabel,
TDF_LabelList TheList
[static]
 

virtual Standard_EXPORT Standard_OStream& TDataStd_Constraint::Dump Standard_OStream &  anOS  )  const [virtual]
 

Reimplemented from TDF_Attribute.

Standard_EXPORT Handle_TNaming_NamedShape TDataStd_Constraint::GetGeometry const Standard_Integer  Index  )  const
 

static Standard_EXPORT const Standard_GUID& TDataStd_Constraint::GetID  )  [static]
 

Standard_EXPORT const Handle_TNaming_NamedShape& TDataStd_Constraint::GetPlane  )  const
 

Standard_EXPORT TDataStd_ConstraintEnum TDataStd_Constraint::GetType  )  const
 

Standard_EXPORT const Handle_TDataStd_Real& TDataStd_Constraint::GetValue  )  const
 

Standard_EXPORT const TDataStd_Constraint::Handle Standard_Type   )  const
 

Reimplemented from TDF_Attribute.

Standard_EXPORT const Standard_GUID& TDataStd_Constraint::ID  )  const [virtual]
 

Implements TDF_Attribute.

Standard_EXPORT Standard_Boolean TDataStd_Constraint::Inverted  )  const
 

Standard_EXPORT void TDataStd_Constraint::Inverted const Standard_Boolean  status  ) 
 

Standard_EXPORT Standard_Boolean TDataStd_Constraint::IsDimension  )  const
 

Standard_EXPORT Standard_Boolean TDataStd_Constraint::IsPlanar  )  const
 

Standard_EXPORT Standard_Integer TDataStd_Constraint::NbGeometries  )  const
 

Standard_EXPORT Handle_TDF_Attribute TDataStd_Constraint::NewEmpty  )  const [virtual]
 

Implements TDF_Attribute.

Standard_EXPORT void TDataStd_Constraint::Paste const Handle(TDF_Attribute)&  Into,
const Handle(TDF_RelocationTable)&  RT
const [virtual]
 

Implements TDF_Attribute.

virtual Standard_EXPORT void TDataStd_Constraint::References const Handle(TDF_DataSet)&  DS  )  const [virtual]
 

Reimplemented from TDF_Attribute.

Standard_EXPORT void TDataStd_Constraint::Restore const Handle(TDF_Attribute)&  With  )  [virtual]
 

Implements TDF_Attribute.

Standard_EXPORT Standard_Boolean TDataStd_Constraint::Reversed  )  const
 

Standard_EXPORT void TDataStd_Constraint::Reversed const Standard_Boolean  status  ) 
 

Standard_EXPORT void TDataStd_Constraint::Set const TDataStd_ConstraintEnum  type,
const Handle(TNaming_NamedShape)&  G1,
const Handle(TNaming_NamedShape)&  G2,
const Handle(TNaming_NamedShape)&  G3,
const Handle(TNaming_NamedShape)&  G4
 

Standard_EXPORT void TDataStd_Constraint::Set const TDataStd_ConstraintEnum  type,
const Handle(TNaming_NamedShape)&  G1,
const Handle(TNaming_NamedShape)&  G2,
const Handle(TNaming_NamedShape)&  G3
 

Standard_EXPORT void TDataStd_Constraint::Set const TDataStd_ConstraintEnum  type,
const Handle(TNaming_NamedShape)&  G1,
const Handle(TNaming_NamedShape)&  G2
 

Standard_EXPORT void TDataStd_Constraint::Set const TDataStd_ConstraintEnum  type,
const Handle(TNaming_NamedShape)&  G1
 

static Standard_EXPORT Handle_TDataStd_Constraint TDataStd_Constraint::Set const TDF_Label label  )  [static]
 

Standard_EXPORT void TDataStd_Constraint::SetGeometry const Standard_Integer  Index,
const Handle(TNaming_NamedShape)&  G
 

Standard_EXPORT void TDataStd_Constraint::SetPlane const Handle(TNaming_NamedShape)&  plane  ) 
 

Standard_EXPORT void TDataStd_Constraint::SetType const TDataStd_ConstraintEnum  CTR  ) 
 

Standard_EXPORT void TDataStd_Constraint::SetValue const Handle(TDataStd_Real)&  V  ) 
 

Standard_EXPORT void TDataStd_Constraint::Verified const Standard_Boolean  status  ) 
 

Standard_EXPORT Standard_Boolean TDataStd_Constraint::Verified  )  const
 


Field Documentation

Handle_TDF_Attribute TDataStd_Constraint::myGeometries[4] [private]
 

Standard_Boolean TDataStd_Constraint::myIsInverted [private]
 

Standard_Boolean TDataStd_Constraint::myIsReversed [private]
 

Standard_Boolean TDataStd_Constraint::myIsVerified [private]
 

Handle_TDF_Attribute TDataStd_Constraint::myPlane [private]
 

TDataStd_ConstraintEnum TDataStd_Constraint::myType [private]
 

Handle_TDataStd_Real TDataStd_Constraint::myValue [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 14:15:18 2008 for OpenCASCADE by  doxygen 1.4.1