Open CASCADE Technology
7.5.0
|
Gives basic data structure for operating and storing graph results (usage is normally internal) Entities are Mapped according their Number in the Model. More...
#include <Interface_Graph.hxx>
Public Member Functions | |
Interface_Graph (const Handle< Interface_InterfaceModel > &amodel, const Interface_GeneralLib &lib, const Standard_Boolean theModeStats=Standard_True) | |
Creates an empty graph, ready to receive Entities from amodel Note that this way of Creation allows <me> to verify that Entities to work with are contained in <amodel> Basic Shared and Sharing lists are obtained from a General Services Library, given directly as an argument. More... | |
Interface_Graph (const Handle< Interface_InterfaceModel > &amodel, const Handle< Interface_Protocol > &protocol, const Standard_Boolean theModeStats=Standard_True) | |
Same as above, but the Library is defined through a Protocol. More... | |
Interface_Graph (const Handle< Interface_InterfaceModel > &amodel, const Handle< Interface_GTool > >ool, const Standard_Boolean theModeStats=Standard_True) | |
Same as above, but the Library is defined through a Protocol. More... | |
Interface_Graph (const Handle< Interface_InterfaceModel > &amodel, const Standard_Boolean theModeStats=Standard_True) | |
Same a above but works with the Protocol recorded in the Model. More... | |
Interface_Graph (const Interface_Graph &agraph, const Standard_Boolean copied=Standard_False) | |
Creates a Graph from another one, getting all its data Remark that status are copied from <agraph>, but the other lists (sharing/shared) are copied only if <copied> = True. More... | |
Interface_Graph & | operator= (const Interface_Graph &theOther) |
Assignment. More... | |
void | Reset () |
Erases data, making graph ready to rebegin from void (also resets Shared lists redefinitions) More... | |
void | ResetStatus () |
Erases Status (Values and Flags of Presence), making graph ready to rebegin from void. Does not concerns Shared lists. More... | |
Standard_Integer | Size () const |
Returns size (max nb of entities, i.e. Model's nb of entities) More... | |
Standard_Integer | NbStatuses () const |
Returns size of array of statuses. More... | |
Standard_Integer | EntityNumber (const Handle< Standard_Transient > &ent) const |
Returns the Number of the entity in the Map, computed at creation time (Entities loaded from the Model) Returns 0 if <ent> not contained by Model used to create <me> (that is, <ent> is unknown from <me>) More... | |
Standard_Boolean | IsPresent (const Standard_Integer num) const |
Returns True if an Entity is noted as present in the graph (See methods Get... which determine this status) Returns False if <num> is out of range too. More... | |
Standard_Boolean | IsPresent (const Handle< Standard_Transient > &ent) const |
Same as above but directly on an Entity <ent> : if it is not contained in the Model, returns False. Else calls IsPresent(num) with <num> given by EntityNumber. More... | |
const Handle< Standard_Transient > & | Entity (const Standard_Integer num) const |
Returns mapped Entity given its no (if it is present) More... | |
Standard_Integer | Status (const Standard_Integer num) const |
Returns Status associated to a numero (only to read it) More... | |
void | SetStatus (const Standard_Integer num, const Standard_Integer stat) |
Modifies Status associated to a numero. More... | |
void | RemoveItem (const Standard_Integer num) |
Clears Entity and sets Status to 0, for a numero. More... | |
void | ChangeStatus (const Standard_Integer oldstat, const Standard_Integer newstat) |
Changes all status which value is oldstat to new value newstat. More... | |
void | RemoveStatus (const Standard_Integer stat) |
Removes all items of which status has a given value stat. More... | |
const Interface_BitMap & | BitMap () const |
Returns the Bit Map in order to read or edit flag values. More... | |
Interface_BitMap & | CBitMap () |
Returns the Bit Map in order to edit it (add new flags) More... | |
const Handle< Interface_InterfaceModel > & | Model () const |
Returns the Model with which this Graph was created. More... | |
void | GetFromModel () |
Loads Graph with all Entities contained in the Model. More... | |
void | GetFromEntity (const Handle< Standard_Transient > &ent, const Standard_Boolean shared, const Standard_Integer newstat=0) |
Gets an Entity, plus its shared ones (at every level) if "shared" is True. New items are set to status "newstat" Items already present in graph remain unchanged Of course, redefinitions of Shared lists are taken into account if there are some. More... | |
void | GetFromEntity (const Handle< Standard_Transient > &ent, const Standard_Boolean shared, const Standard_Integer newstat, const Standard_Integer overlapstat, const Standard_Boolean cumul) |
Gets an Entity, plus its shared ones (at every level) if "shared" is True. New items are set to status "newstat". Items already present in graph are processed as follows : More... | |
void | GetFromIter (const Interface_EntityIterator &iter, const Standard_Integer newstat) |
Gets Entities given by an EntityIterator. Entities which were not yet present in the graph are mapped with status "newstat" Entities already present remain unchanged. More... | |
void | GetFromIter (const Interface_EntityIterator &iter, const Standard_Integer newstat, const Standard_Integer overlapstat, const Standard_Boolean cumul) |
Gets Entities given by an EntityIterator and distinguishes those already present in the Graph : More... | |
void | GetFromGraph (const Interface_Graph &agraph) |
Gets all present items from another graph. More... | |
void | GetFromGraph (const Interface_Graph &agraph, const Standard_Integer stat) |
Gets items from another graph which have a specific Status. More... | |
Standard_Boolean | HasShareErrors (const Handle< Standard_Transient > &ent) const |
Returns True if <ent> or the list of entities shared by <ent> (not redefined) contains items unknown from this Graph Remark : apart from the status HasShareError, these items are ignored. More... | |
Handle< TColStd_HSequenceOfTransient > | GetShareds (const Handle< Standard_Transient > &ent) const |
Returns the sequence of Entities Shared by an Entity. More... | |
Interface_EntityIterator | Shareds (const Handle< Standard_Transient > &ent) const |
Returns the list of Entities Shared by an Entity, as recorded by the Graph. That is, by default Basic Shared List, else it can be redefined by methods SetShare, SetNoShare ... see below. More... | |
Interface_EntityIterator | Sharings (const Handle< Standard_Transient > &ent) const |
Returns the list of Entities which Share an Entity, computed from the Basic or Redefined Shared Lists. More... | |
Handle< TColStd_HSequenceOfTransient > | GetSharings (const Handle< Standard_Transient > &ent) const |
Returns the sequence of Entities Sharings by an Entity. More... | |
Interface_EntityIterator | TypedSharings (const Handle< Standard_Transient > &ent, const Handle< Standard_Type > &type) const |
Returns the list of sharings entities, AT ANY LEVEL, which are kind of a given type. A sharing entity kind of this type ends the exploration of its branch. More... | |
Interface_EntityIterator | RootEntities () const |
Returns the Entities which are not Shared (their Sharing List is empty) in the Model. More... | |
Handle< TCollection_HAsciiString > | Name (const Handle< Standard_Transient > &ent) const |
Determines the name attached to an entity, by using the general service Name in GeneralModule Returns a null handle if no name could be computed or if the entity is not in the model. More... | |
const Handle< TColStd_HArray1OfListOfInteger > & | SharingTable () const |
Returns the Table of Sharing lists. Used to Create another Graph from <me> More... | |
Standard_Boolean | ModeStat () const |
Returns mode resposible for computation of statuses;. More... | |
Protected Member Functions | |
void | InitStats () |
Initialize statuses and flags. More... | |
Protected Attributes | |
Handle< Interface_InterfaceModel > | themodel |
TCollection_AsciiString | thepresents |
Handle< TColStd_HArray1OfInteger > | thestats |
Handle< TColStd_HArray1OfListOfInteger > | thesharings |
Gives basic data structure for operating and storing graph results (usage is normally internal) Entities are Mapped according their Number in the Model.
Each Entity from the Model can be known as "Present" or not; if it is, it is Mapped with a Status : an Integer which can be used according to needs of each algorithm In addition, the Graph brings a BitMap which can be used by any caller
Also, it is bound with two lists : a list of Shared Entities (in fact, their Numbers in the Model) which is filled by a ShareTool, and a list of Sharing Entities, computed by deduction from the Shared Lists
Moreover, it is possible to redefine the list of Entities Shared by an Entity (instead of standard answer by general service Shareds) : this new list can be empty; it can be changed or reset (i.e. to come back to standard answer)
Interface_Graph::Interface_Graph | ( | const Handle< Interface_InterfaceModel > & | amodel, |
const Interface_GeneralLib & | lib, | ||
const Standard_Boolean | theModeStats = Standard_True |
||
) |
Creates an empty graph, ready to receive Entities from amodel Note that this way of Creation allows <me> to verify that Entities to work with are contained in <amodel> Basic Shared and Sharing lists are obtained from a General Services Library, given directly as an argument.
Interface_Graph::Interface_Graph | ( | const Handle< Interface_InterfaceModel > & | amodel, |
const Handle< Interface_Protocol > & | protocol, | ||
const Standard_Boolean | theModeStats = Standard_True |
||
) |
Same as above, but the Library is defined through a Protocol.
Interface_Graph::Interface_Graph | ( | const Handle< Interface_InterfaceModel > & | amodel, |
const Handle< Interface_GTool > & | gtool, | ||
const Standard_Boolean | theModeStats = Standard_True |
||
) |
Same as above, but the Library is defined through a Protocol.
Interface_Graph::Interface_Graph | ( | const Handle< Interface_InterfaceModel > & | amodel, |
const Standard_Boolean | theModeStats = Standard_True |
||
) |
Same a above but works with the Protocol recorded in the Model.
Interface_Graph::Interface_Graph | ( | const Interface_Graph & | agraph, |
const Standard_Boolean | copied = Standard_False |
||
) |
Creates a Graph from another one, getting all its data Remark that status are copied from <agraph>, but the other lists (sharing/shared) are copied only if <copied> = True.
const Interface_BitMap& Interface_Graph::BitMap | ( | ) | const |
Returns the Bit Map in order to read or edit flag values.
Interface_BitMap& Interface_Graph::CBitMap | ( | ) |
Returns the Bit Map in order to edit it (add new flags)
void Interface_Graph::ChangeStatus | ( | const Standard_Integer | oldstat, |
const Standard_Integer | newstat | ||
) |
Changes all status which value is oldstat to new value newstat.
const Handle< Standard_Transient >& Interface_Graph::Entity | ( | const Standard_Integer | num | ) | const |
Returns mapped Entity given its no (if it is present)
Standard_Integer Interface_Graph::EntityNumber | ( | const Handle< Standard_Transient > & | ent | ) | const |
Returns the Number of the entity in the Map, computed at creation time (Entities loaded from the Model) Returns 0 if <ent> not contained by Model used to create <me> (that is, <ent> is unknown from <me>)
void Interface_Graph::GetFromEntity | ( | const Handle< Standard_Transient > & | ent, |
const Standard_Boolean | shared, | ||
const Standard_Integer | newstat = 0 |
||
) |
Gets an Entity, plus its shared ones (at every level) if "shared" is True. New items are set to status "newstat" Items already present in graph remain unchanged Of course, redefinitions of Shared lists are taken into account if there are some.
void Interface_Graph::GetFromEntity | ( | const Handle< Standard_Transient > & | ent, |
const Standard_Boolean | shared, | ||
const Standard_Integer | newstat, | ||
const Standard_Integer | overlapstat, | ||
const Standard_Boolean | cumul | ||
) |
Gets an Entity, plus its shared ones (at every level) if "shared" is True. New items are set to status "newstat". Items already present in graph are processed as follows :
void Interface_Graph::GetFromGraph | ( | const Interface_Graph & | agraph | ) |
Gets all present items from another graph.
void Interface_Graph::GetFromGraph | ( | const Interface_Graph & | agraph, |
const Standard_Integer | stat | ||
) |
Gets items from another graph which have a specific Status.
void Interface_Graph::GetFromIter | ( | const Interface_EntityIterator & | iter, |
const Standard_Integer | newstat | ||
) |
Gets Entities given by an EntityIterator. Entities which were not yet present in the graph are mapped with status "newstat" Entities already present remain unchanged.
void Interface_Graph::GetFromIter | ( | const Interface_EntityIterator & | iter, |
const Standard_Integer | newstat, | ||
const Standard_Integer | overlapstat, | ||
const Standard_Boolean | cumul | ||
) |
Gets Entities given by an EntityIterator and distinguishes those already present in the Graph :
void Interface_Graph::GetFromModel | ( | ) |
Loads Graph with all Entities contained in the Model.
Handle< TColStd_HSequenceOfTransient > Interface_Graph::GetShareds | ( | const Handle< Standard_Transient > & | ent | ) | const |
Returns the sequence of Entities Shared by an Entity.
Handle< TColStd_HSequenceOfTransient > Interface_Graph::GetSharings | ( | const Handle< Standard_Transient > & | ent | ) | const |
Returns the sequence of Entities Sharings by an Entity.
Standard_Boolean Interface_Graph::HasShareErrors | ( | const Handle< Standard_Transient > & | ent | ) | const |
Returns True if <ent> or the list of entities shared by <ent> (not redefined) contains items unknown from this Graph Remark : apart from the status HasShareError, these items are ignored.
|
protected |
Initialize statuses and flags.
Standard_Boolean Interface_Graph::IsPresent | ( | const Standard_Integer | num | ) | const |
Returns True if an Entity is noted as present in the graph (See methods Get... which determine this status) Returns False if <num> is out of range too.
Standard_Boolean Interface_Graph::IsPresent | ( | const Handle< Standard_Transient > & | ent | ) | const |
Same as above but directly on an Entity <ent> : if it is not contained in the Model, returns False. Else calls IsPresent(num) with <num> given by EntityNumber.
const Handle< Interface_InterfaceModel >& Interface_Graph::Model | ( | ) | const |
Returns the Model with which this Graph was created.
Standard_Boolean Interface_Graph::ModeStat | ( | ) | const |
Returns mode resposible for computation of statuses;.
Handle< TCollection_HAsciiString > Interface_Graph::Name | ( | const Handle< Standard_Transient > & | ent | ) | const |
Determines the name attached to an entity, by using the general service Name in GeneralModule Returns a null handle if no name could be computed or if the entity is not in the model.
Standard_Integer Interface_Graph::NbStatuses | ( | ) | const |
Returns size of array of statuses.
Interface_Graph& Interface_Graph::operator= | ( | const Interface_Graph & | theOther | ) |
Assignment.
void Interface_Graph::RemoveItem | ( | const Standard_Integer | num | ) |
Clears Entity and sets Status to 0, for a numero.
void Interface_Graph::RemoveStatus | ( | const Standard_Integer | stat | ) |
Removes all items of which status has a given value stat.
void Interface_Graph::Reset | ( | ) |
Erases data, making graph ready to rebegin from void (also resets Shared lists redefinitions)
void Interface_Graph::ResetStatus | ( | ) |
Erases Status (Values and Flags of Presence), making graph ready to rebegin from void. Does not concerns Shared lists.
Interface_EntityIterator Interface_Graph::RootEntities | ( | ) | const |
Returns the Entities which are not Shared (their Sharing List is empty) in the Model.
void Interface_Graph::SetStatus | ( | const Standard_Integer | num, |
const Standard_Integer | stat | ||
) |
Modifies Status associated to a numero.
Interface_EntityIterator Interface_Graph::Shareds | ( | const Handle< Standard_Transient > & | ent | ) | const |
Returns the list of Entities Shared by an Entity, as recorded by the Graph. That is, by default Basic Shared List, else it can be redefined by methods SetShare, SetNoShare ... see below.
Interface_EntityIterator Interface_Graph::Sharings | ( | const Handle< Standard_Transient > & | ent | ) | const |
Returns the list of Entities which Share an Entity, computed from the Basic or Redefined Shared Lists.
const Handle< TColStd_HArray1OfListOfInteger >& Interface_Graph::SharingTable | ( | ) | const |
Returns the Table of Sharing lists. Used to Create another Graph from <me>
Standard_Integer Interface_Graph::Size | ( | ) | const |
Returns size (max nb of entities, i.e. Model's nb of entities)
Standard_Integer Interface_Graph::Status | ( | const Standard_Integer | num | ) | const |
Returns Status associated to a numero (only to read it)
Interface_EntityIterator Interface_Graph::TypedSharings | ( | const Handle< Standard_Transient > & | ent, |
const Handle< Standard_Type > & | type | ||
) | const |
Returns the list of sharings entities, AT ANY LEVEL, which are kind of a given type. A sharing entity kind of this type ends the exploration of its branch.
|
protected |
|
protected |
|
protected |
|
protected |