Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions
Interface_InterfaceModel Class Referenceabstract

Defines an (Indexed) Set of data corresponding to a complete
Transfer by a File Interface, i.e. File Header and Transient
Entities (Objects) contained in a File. Contained Entities are
identified in the Model by unique and consecutive Numbers.

In addition, a Model can attach to each entity, a specific
Label according to the norm (e.g. Name for VDA, #ident for
Step ...), intended to be output on a string or a stream
(remark : labels are not obliged to be unique)

InterfaceModel itself is not Transient, it is intended to
work on a set of Transient Data. The services offered are
basic Listing and Identification operations on Transient
Entities, storage of Error Reports, Copying.

Moreovere, it is possible to define and use templates. These
are empty Models, from which copies can be obtained in order
to be filled with effective data. This allows to record
standard definitions for headers, avoiding to recreate them
for each sendings, and assuring customisation of produced
files for a given site.
A template is attached to a name. It is possible to define a
template from another one (get it, edit it then record it
under another name).

See also Graph, ShareTool, CheckTool for more
More...

#include <Interface_InterfaceModel.hxx>

Inheritance diagram for Interface_InterfaceModel:
Inheritance graph
[legend]

Public Member Functions

void Destroy ()
 Clears the list of entities (service WhenDelete)
More...
 
 ~Interface_InterfaceModel ()
 
void SetProtocol (const Handle< Interface_Protocol > &proto)
 Sets a Protocol for this Model
It is also set by a call to AddWithRefs with Protocol
It is used for : DumpHeader (as required), ClearEntities ...
More...
 
virtual Handle_Interface_Protocol Protocol () const
 Returns the Protocol which has been set by SetProtocol, or
AddWithRefs with Protocol
More...
 
void SetGTool (const Handle< Interface_GTool > &gtool)
 Sets a GTool for this model, which already defines a Protocol
More...
 
Handle_Interface_GTool GTool () const
 Returns the GTool, set by SetProtocol or by SetGTool
More...
 
Standard_BooleanDispatchStatus ()
 Returns the Dispatch Status, either for get or set
A Model which is produced from Dispatch may share entities
with the original (according to the Protocol), hence these
non-copied entities should not be deleted
More...
 
virtual void Clear ()
 Erases contained data; used when a Model is copied to others :
the new copied ones begin from clear
Clear calls specific method ClearHeader (see below)
More...
 
virtual void ClearEntities ()
 Clears the entities; uses the general service WhenDelete, in
addition to the standard Memory Manager; can be redefined
More...
 
virtual void ClearLabels ()=0
 Erases informations about labels, if any : specific to each
norm
More...
 
virtual void ClearHeader ()=0
 Clears Model's header : specific to each norm
More...
 
Standard_Integer NbEntities () const
 Returns count of contained Entities
More...
 
Standard_Boolean Contains (const Handle< Standard_Transient > &anentity) const
 Returns True if a Model contains an Entity (for a ReportEntity,
looks for the ReportEntity itself AND its Concerned Entity)
More...
 
Standard_Integer Number (const Handle< Standard_Transient > &anentity) const
 Returns the Number of an Entity in the Model if it contains it.
Else returns 0. For a ReportEntity, looks at Concerned Entity.
//! Returns the Directory entry Number of an Entity in
the Model if it contains it. Else returns 0. For a
ReportEntity, looks at Concerned Entity.
More...
 
const Handle_Standard_Transient & Value (const Standard_Integer num) const
 
 Returns an Entity identified by its number in the Model <br>
      Each sub-class of InterfaceModel can define its own method <br>
      Entity to return its specific class of Entity (e.g. for VDA, <br>
      VDAModel returns a VDAEntity), working by calling Value <br>

Remark : For a Reported Entity, (Erroneous, Corrected, Unknown), this
method returns this Reported Entity.
See ReportEntity for other questions.
More...

 
Standard_Integer NbTypes (const Handle< Standard_Transient > &ent) const
 Returns the count of DISTINCT types under which an entity may
be processed. Defined by the Protocol, which gives default as
1 (dynamic Type).
More...
 
Handle_Standard_Type Type (const Handle< Standard_Transient > &ent, const Standard_Integer num=1) const
 Returns a type, given its rank : defined by the Protocol
(by default, the first one)
More...
 
Standard_CString TypeName (const Handle< Standard_Transient > &ent, const Standard_Boolean complete=Standard_True) const
 Returns the type name of an entity, from the list of types
(one or more ...)
<complete> True (D) gives the complete type, else packages are
removed
WARNING : buffered, to be immediately copied or printed
More...
 
Interface_DataState EntityState (const Standard_Integer num) const
 Returns the State of an entity, given its number
More...
 
Standard_Boolean IsReportEntity (const Standard_Integer num, const Standard_Boolean semantic=Standard_False) const
 
 Returns True if <num> identifies a ReportEntity in the Model <br>
      Hence, ReportEntity can be called. <br>


By default, queries main report, if <semantic> is True, it
queries report for semantic check

Remember that a Report Entity can be defined for an Unknown
Entity, or a Corrected or Erroneous (at read time) Entity.
The ReportEntity is defined before call to method AddEntity.
More...

 
Handle_Interface_ReportEntity ReportEntity (const Standard_Integer num, const Standard_Boolean semantic=Standard_False) const
 
 Returns a ReportEntity identified by its number in the Model, <br>
      or a Null Handle If <num> does not identify a ReportEntity. <br>


By default, queries main report, if <semantic> is True, it
queries report for semantic check
More...

 
Standard_Boolean IsErrorEntity (const Standard_Integer num) const
 Returns True if <num> identifies an Error Entity : in this
case, a ReportEntity brings Fail Messages and possibly an
"undefined" Content, see IsRedefinedEntity
More...
 
Standard_Boolean IsRedefinedContent (const Standard_Integer num) const
 Returns True if <num> identifies an Entity which content is
redefined through a ReportEntity (i.e. with literal data only)
This happens when an entity is syntactically erroneous in the
way that its basic content remains empty.
For more details (such as content itself), see ReportEntity
More...
 
Standard_Boolean ClearReportEntity (const Standard_Integer num)
 
Removes the ReportEntity attached to Entity <num>. Returns <br>
     True if done, False if no ReportEntity was attached to <num>. <br>

Warning : the caller must assume that this clearing is meaningfull
More...

 
Standard_Boolean SetReportEntity (const Standard_Integer num, const Handle< Interface_ReportEntity > &rep)
 
Sets or Replaces a ReportEntity for the Entity <num>. Returns <br>
     True if Report is replaced, False if it has been replaced <br>

Warning : the caller must assume that this setting is meaningfull
More...

 
Standard_Boolean AddReportEntity (const Handle< Interface_ReportEntity > &rep, const Standard_Boolean semantic=Standard_False)
 Adds a ReportEntity as such. Returns False if the concerned
entity is not recorded in the Model
Else, adds it into, either the main report list or the
list for semantic checks, then returns True
More...
 
Standard_Boolean IsUnknownEntity (const Standard_Integer num) const
 Returns True if <num> identifies an Unknown Entity : in this
case, a ReportEntity with no Check Messages designates it.
More...
 
void FillSemanticChecks (const Interface_CheckIterator &checks, const Standard_Boolean clear=Standard_True)
 Fills the list of semantic checks.
This list is computed (by CheckTool). Hence, it can be stored
in the model for later queries
<clear> True (D) : new list replaces
<clear> False : new list is cumulated
More...
 
Standard_Boolean HasSemanticChecks () const
 Returns True if semantic checks have been filled
More...
 
const Handle_Interface_Check & Check (const Standard_Integer num, const Standard_Boolean syntactic) const
 Returns the check attached to an entity, designated by its
Number. 0 for global check
<semantic> True : recorded semantic check
<semantic> False : recorded syntactic check (see ReportEntity)
If no check is recorded for <num>, returns an empty Check
More...
 
virtual void Reservate (const Standard_Integer nbent)
 Does a reservation for the List of Entities (for optimized
storage management). If it is not called, storage management
can be less efficient. <nbent> is the expected count of
Entities to store
More...
 
virtual void AddEntity (const Handle< Standard_Transient > &anentity)
 Internal method for adding an Entity. Used by file reading
(defined by each Interface) and Transfer tools. It adds the
entity required to be added, not its refs : see AddWithRefs.
If <anentity> is a ReportEntity, it is added to the list of
Reports, its Concerned Entity (Erroneous or Corrected, else
Unknown) is added to the list of Entities.
That is, the ReportEntity must be created before Adding
More...
 
void AddWithRefs (const Handle< Standard_Transient > &anent, const Handle< Interface_Protocol > &proto, const Standard_Integer level=0, const Standard_Boolean listall=Standard_False)
 
 Adds to the Model, an Entity with all its References, as they <br>
      are defined by General Services FillShared and ListImplied. <br>
      Process is recursive (any sub-levels) if <level> = 0 (Default) <br>
      Else, adds sub-entities until the required sub-level. <br>
      Especially, if <level> = 1, adds immediate subs and that's all <br>


If <listall> is False (Default), an entity (<anentity> itself
or one of its subs at any level) which is already recorded in
the Model is not analysed, only the newly added ones are.
If <listall> is True, all items are analysed (this allows to
ensure the consistency of an adding made by steps)
More...

 
void AddWithRefs (const Handle< Standard_Transient > &anent, const Standard_Integer level=0, const Standard_Boolean listall=Standard_False)
 Same as above, but works with the Protocol of the Model
More...
 
void AddWithRefs (const Handle< Standard_Transient > &anent, const Interface_GeneralLib &lib, const Standard_Integer level=0, const Standard_Boolean listall=Standard_False)
 Same as above, but works with an already created GeneralLib
More...
 
void ReplaceEntity (const Standard_Integer nument, const Handle< Standard_Transient > &anent)
 Replace Entity with Number=nument on other entity - "anent"
More...
 
void ReverseOrders (const Standard_Integer after=0)
 Reverses the Numbers of the Entities, between <after> and the
total count of Entities. Thus, the entities :
1,2 ... after, after+1 ... nb-1, nb become numbered as :
1,2 ... after, nb, nb-1 ... after+1
By default (after = 0) the whole list of Entities is reversed
More...
 
void ChangeOrder (const Standard_Integer oldnum, const Standard_Integer newnum, const Standard_Integer count=1)
 Changes the Numbers of some Entities : <oldnum> is moved to
<newnum>, same for <count> entities. Thus :
1,2 ... newnum-1 newnum ... oldnum .. oldnum+count oldnum+count+1 .. gives
1,2 ... newnum-1 oldnum .. oldnum+count newnum ... oldnum+count+1
(can be seen as a circular permutation)
More...
 
void GetFromTransfer (const Interface_EntityIterator &aniter)
 Gets contents from an EntityIterator, prepared by a
Transfer tool (e.g TransferCopy). Starts from clear
More...
 
virtual void GetFromAnother (const Handle< Interface_InterfaceModel > &other)=0
 Gets header (data specific of a defined Interface) from
another InterfaceModel; called from TransferCopy
More...
 
virtual
Handle_Interface_InterfaceModel 
NewEmptyModel () const =0
 Returns a New Empty Model, same type as <me> (whatever its
Type); called to Copy parts a Model into other ones, then
followed by a call to GetFromAnother (Header) then filling
with specified Entities, themselves copied
More...
 
Standard_Boolean SetCategoryNumber (const Standard_Integer num, const Standard_Integer val)
 Records a category number for an entity number
Returns True when done, False if <num> is out of range
More...
 
Standard_Integer CategoryNumber (const Standard_Integer num) const
 Returns the recorded category number for a given entity number
0 if none was defined for this entity
More...
 
void FillIterator (Interface_EntityIterator &iter) const
 Allows an EntityIterator to get a list of Entities
More...
 
Interface_EntityIterator Entities () const
 Returns the list of all Entities, as an Iterator on Entities
(the Entities themselves, not the Reports)
More...
 
Interface_EntityIterator Reports (const Standard_Boolean semantic=Standard_False) const
 Returns the list of all ReportEntities, i.e. data about
Entities read with Error or Warning informations
(each item has to be casted to Report Entity then it can be
queried for Concerned Entity, Content, Check ...)
By default, returns the main reports, is <semantic> is True it
returns the list for sematic checks
More...
 
Interface_EntityIterator Redefineds () const
 Returns the list of ReportEntities which redefine data
(generally, if concerned entity is "Error", a literal content
is added to it : this is a "redefined entity"
More...
 
const Handle_Interface_Check & GlobalCheck (const Standard_Boolean syntactic=Standard_True) const
 Returns the GlobalCheck, which memorizes messages global to
the file (not specific to an Entity), especially Header
More...
 
void SetGlobalCheck (const Handle< Interface_Check > &ach)
 Allows to modify GlobalCheck, after getting then completing it
Remark : it is SYNTACTIC check. Semantics, see FillChecks
More...
 
virtual void VerifyCheck (Handle< Interface_Check > &ach) const
 Minimum Semantic Global Check on data in model (header)
Can only check basic Data. See also GlobalCheck from Protocol
for a check which takes the Graph into account
Default does nothing, can be redefined
More...
 
virtual void DumpHeader (const Handle< Message_Messenger > &S, const Standard_Integer level=0) const =0
 Dumps Header in a short, easy to read, form, onto a Stream
<level> allows to print more or less parts of the header,
if necessary. 0 for basic print
More...
 
void Print (const Handle< Standard_Transient > &ent, const Handle< Message_Messenger > &s, const Standard_Integer mode=0) const
 Prints identification of a given entity in <me>, in order to
be printed in a list or phrase
<mode> < 0 : prints only its number
<mode> = 1 : just calls PrintLabel
<mode> = 0 (D) : prints its number plus '/' plus PrintLabel
If <ent> == <me>, simply prints "Global"
If <ent> is unknown, prints "??/its type"
More...
 
virtual void PrintLabel (const Handle< Standard_Transient > &ent, const Handle< Message_Messenger > &S) const =0
 Prints label specific to each norm, for a given entity.
Must only print label itself, in order to be included in a
phrase. Can call the result of StringLabel, but not obliged.
More...
 
virtual void PrintToLog (const Handle< Standard_Transient > &ent, const Handle< Message_Messenger > &S) const
 Prints label specific to each norm in log format, for
a given entity.
By default, just calls PrintLabel, can be redefined
More...
 
virtual
Handle_TCollection_HAsciiString 
StringLabel (const Handle< Standard_Transient > &ent) const =0
 
Returns a string with the label attached to a given entity. <br>

Warning : While this string may be edited on the spot, if it is a read
field, the returned value must be copied before.
More...

 
virtual Standard_Integer NextNumberForLabel (const Standard_CString label, const Standard_Integer lastnum=0, const Standard_Boolean exact=Standard_True) const
 
 Searches a label which matches with one entity. <br>
      Begins from <lastnum>+1 (default:1) and scans the entities <br>
      until <NbEntities>. For the first which matches <label>, <br>
      this method returns its Number. Returns 0 if nothing found <br>
      Can be called recursively (labels are not specified as unique) <br>
      <exact> : if True (default), exact match is required <br>
      else, checks the END of entity label <br>


This method is virtual, hence it can be redefined for a more
efficient search (if exact is true).
More...

 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void ShallowDump (Standard_OStream &) const
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Static Public Member Functions

static Standard_CString ClassName (const Standard_CString typnam)
 From a CDL Type Name, returns the Class part (package dropped)
WARNING : buffered, to be immediately copied or printed
More...
 
static Standard_Boolean HasTemplate (const Standard_CString name)
 Returns true if a template is attached to a given name
More...
 
static
Handle_Interface_InterfaceModel 
Template (const Standard_CString name)
 Returns the template model attached to a name, or a Null Handle
More...
 
static Standard_Boolean SetTemplate (const Standard_CString name, const Handle< Interface_InterfaceModel > &model)
 Records a new template model with a name. If the name was
already recorded, the corresponding template is replaced by
the new one. Then, WARNING : test HasTemplate to avoid
surprises
More...
 
static
Handle_TColStd_HSequenceOfHAsciiString 
ListTemplates ()
 Returns the complete list of names attached to template models
More...
 

Protected Member Functions

 Interface_InterfaceModel ()
 Defines empty InterfaceModel, ready to be filled
More...
 

Detailed Description

Defines an (Indexed) Set of data corresponding to a complete
Transfer by a File Interface, i.e. File Header and Transient
Entities (Objects) contained in a File. Contained Entities are
identified in the Model by unique and consecutive Numbers.

In addition, a Model can attach to each entity, a specific
Label according to the norm (e.g. Name for VDA, #ident for
Step ...), intended to be output on a string or a stream
(remark : labels are not obliged to be unique)

InterfaceModel itself is not Transient, it is intended to
work on a set of Transient Data. The services offered are
basic Listing and Identification operations on Transient
Entities, storage of Error Reports, Copying.

Moreovere, it is possible to define and use templates. These
are empty Models, from which copies can be obtained in order
to be filled with effective data. This allows to record
standard definitions for headers, avoiding to recreate them
for each sendings, and assuring customisation of produced
files for a given site.
A template is attached to a name. It is possible to define a
template from another one (get it, edit it then record it
under another name).

See also Graph, ShareTool, CheckTool for more

Constructor & Destructor Documentation

Interface_InterfaceModel::~Interface_InterfaceModel ( )
inline
Interface_InterfaceModel::Interface_InterfaceModel ( )
protected

Defines empty InterfaceModel, ready to be filled

Member Function Documentation

virtual void Interface_InterfaceModel::AddEntity ( const Handle< Standard_Transient > &  anentity)
virtual

Internal method for adding an Entity. Used by file reading
(defined by each Interface) and Transfer tools. It adds the
entity required to be added, not its refs : see AddWithRefs.
If <anentity> is a ReportEntity, it is added to the list of
Reports, its Concerned Entity (Erroneous or Corrected, else
Unknown) is added to the list of Entities.
That is, the ReportEntity must be created before Adding

Standard_Boolean Interface_InterfaceModel::AddReportEntity ( const Handle< Interface_ReportEntity > &  rep,
const Standard_Boolean  semantic = Standard_False 
)

Adds a ReportEntity as such. Returns False if the concerned
entity is not recorded in the Model
Else, adds it into, either the main report list or the
list for semantic checks, then returns True

void Interface_InterfaceModel::AddWithRefs ( const Handle< Standard_Transient > &  anent,
const Handle< Interface_Protocol > &  proto,
const Standard_Integer  level = 0,
const Standard_Boolean  listall = Standard_False 
)

 Adds to the Model, an Entity with all its References, as they <br>
      are defined by General Services FillShared and ListImplied. <br>
      Process is recursive (any sub-levels) if <level> = 0 (Default) <br>
      Else, adds sub-entities until the required sub-level. <br>
      Especially, if <level> = 1, adds immediate subs and that's all <br>


If <listall> is False (Default), an entity (<anentity> itself
or one of its subs at any level) which is already recorded in
the Model is not analysed, only the newly added ones are.
If <listall> is True, all items are analysed (this allows to
ensure the consistency of an adding made by steps)

void Interface_InterfaceModel::AddWithRefs ( const Handle< Standard_Transient > &  anent,
const Standard_Integer  level = 0,
const Standard_Boolean  listall = Standard_False 
)

Same as above, but works with the Protocol of the Model

void Interface_InterfaceModel::AddWithRefs ( const Handle< Standard_Transient > &  anent,
const Interface_GeneralLib lib,
const Standard_Integer  level = 0,
const Standard_Boolean  listall = Standard_False 
)

Same as above, but works with an already created GeneralLib

Standard_Integer Interface_InterfaceModel::CategoryNumber ( const Standard_Integer  num) const

Returns the recorded category number for a given entity number
0 if none was defined for this entity

void Interface_InterfaceModel::ChangeOrder ( const Standard_Integer  oldnum,
const Standard_Integer  newnum,
const Standard_Integer  count = 1 
)

Changes the Numbers of some Entities : <oldnum> is moved to
<newnum>, same for <count> entities. Thus :
1,2 ... newnum-1 newnum ... oldnum .. oldnum+count oldnum+count+1 .. gives
1,2 ... newnum-1 oldnum .. oldnum+count newnum ... oldnum+count+1
(can be seen as a circular permutation)

const Handle_Interface_Check& Interface_InterfaceModel::Check ( const Standard_Integer  num,
const Standard_Boolean  syntactic 
) const

Returns the check attached to an entity, designated by its
Number. 0 for global check
<semantic> True : recorded semantic check
<semantic> False : recorded syntactic check (see ReportEntity)
If no check is recorded for <num>, returns an empty Check

static Standard_CString Interface_InterfaceModel::ClassName ( const Standard_CString  typnam)
static

From a CDL Type Name, returns the Class part (package dropped)
WARNING : buffered, to be immediately copied or printed

virtual void Interface_InterfaceModel::Clear ( )
virtual

Erases contained data; used when a Model is copied to others :
the new copied ones begin from clear
Clear calls specific method ClearHeader (see below)

virtual void Interface_InterfaceModel::ClearEntities ( )
virtual

Clears the entities; uses the general service WhenDelete, in
addition to the standard Memory Manager; can be redefined

virtual void Interface_InterfaceModel::ClearHeader ( )
pure virtual

Clears Model's header : specific to each norm

Implemented in IGESData_IGESModel, and StepData_StepModel.

virtual void Interface_InterfaceModel::ClearLabels ( )
pure virtual

Erases informations about labels, if any : specific to each
norm

Implemented in IGESData_IGESModel, and StepData_StepModel.

Standard_Boolean Interface_InterfaceModel::ClearReportEntity ( const Standard_Integer  num)

Removes the ReportEntity attached to Entity <num>. Returns <br>
     True if done, False if no ReportEntity was attached to <num>. <br>

Warning : the caller must assume that this clearing is meaningfull

Standard_Boolean Interface_InterfaceModel::Contains ( const Handle< Standard_Transient > &  anentity) const

Returns True if a Model contains an Entity (for a ReportEntity,
looks for the ReportEntity itself AND its Concerned Entity)

void Interface_InterfaceModel::Destroy ( )

Clears the list of entities (service WhenDelete)

Standard_Boolean& Interface_InterfaceModel::DispatchStatus ( )

Returns the Dispatch Status, either for get or set
A Model which is produced from Dispatch may share entities
with the original (according to the Protocol), hence these
non-copied entities should not be deleted

virtual void Interface_InterfaceModel::DumpHeader ( const Handle< Message_Messenger > &  S,
const Standard_Integer  level = 0 
) const
pure virtual

Dumps Header in a short, easy to read, form, onto a Stream
<level> allows to print more or less parts of the header,
if necessary. 0 for basic print

Implemented in StepData_StepModel, and IGESData_IGESModel.

Interface_EntityIterator Interface_InterfaceModel::Entities ( ) const

Returns the list of all Entities, as an Iterator on Entities
(the Entities themselves, not the Reports)

Interface_DataState Interface_InterfaceModel::EntityState ( const Standard_Integer  num) const

Returns the State of an entity, given its number

void Interface_InterfaceModel::FillIterator ( Interface_EntityIterator iter) const

Allows an EntityIterator to get a list of Entities

void Interface_InterfaceModel::FillSemanticChecks ( const Interface_CheckIterator checks,
const Standard_Boolean  clear = Standard_True 
)

Fills the list of semantic checks.
This list is computed (by CheckTool). Hence, it can be stored
in the model for later queries
<clear> True (D) : new list replaces
<clear> False : new list is cumulated

virtual void Interface_InterfaceModel::GetFromAnother ( const Handle< Interface_InterfaceModel > &  other)
pure virtual

Gets header (data specific of a defined Interface) from
another InterfaceModel; called from TransferCopy

Implemented in IGESData_IGESModel, and StepData_StepModel.

void Interface_InterfaceModel::GetFromTransfer ( const Interface_EntityIterator aniter)

Gets contents from an EntityIterator, prepared by a
Transfer tool (e.g TransferCopy). Starts from clear

const Handle_Interface_Check& Interface_InterfaceModel::GlobalCheck ( const Standard_Boolean  syntactic = Standard_True) const

Returns the GlobalCheck, which memorizes messages global to
the file (not specific to an Entity), especially Header

Handle_Interface_GTool Interface_InterfaceModel::GTool ( ) const

Returns the GTool, set by SetProtocol or by SetGTool

Standard_Boolean Interface_InterfaceModel::HasSemanticChecks ( ) const

Returns True if semantic checks have been filled

static Standard_Boolean Interface_InterfaceModel::HasTemplate ( const Standard_CString  name)
static

Returns true if a template is attached to a given name

Standard_Boolean Interface_InterfaceModel::IsErrorEntity ( const Standard_Integer  num) const

Returns True if <num> identifies an Error Entity : in this
case, a ReportEntity brings Fail Messages and possibly an
"undefined" Content, see IsRedefinedEntity

Standard_Boolean Interface_InterfaceModel::IsRedefinedContent ( const Standard_Integer  num) const

Returns True if <num> identifies an Entity which content is
redefined through a ReportEntity (i.e. with literal data only)
This happens when an entity is syntactically erroneous in the
way that its basic content remains empty.
For more details (such as content itself), see ReportEntity

Standard_Boolean Interface_InterfaceModel::IsReportEntity ( const Standard_Integer  num,
const Standard_Boolean  semantic = Standard_False 
) const

 Returns True if <num> identifies a ReportEntity in the Model <br>
      Hence, ReportEntity can be called. <br>


By default, queries main report, if <semantic> is True, it
queries report for semantic check

Remember that a Report Entity can be defined for an Unknown
Entity, or a Corrected or Erroneous (at read time) Entity.
The ReportEntity is defined before call to method AddEntity.

Standard_Boolean Interface_InterfaceModel::IsUnknownEntity ( const Standard_Integer  num) const

Returns True if <num> identifies an Unknown Entity : in this
case, a ReportEntity with no Check Messages designates it.

static Handle_TColStd_HSequenceOfHAsciiString Interface_InterfaceModel::ListTemplates ( )
static

Returns the complete list of names attached to template models

Standard_Integer Interface_InterfaceModel::NbEntities ( ) const

Returns count of contained Entities

Standard_Integer Interface_InterfaceModel::NbTypes ( const Handle< Standard_Transient > &  ent) const

Returns the count of DISTINCT types under which an entity may
be processed. Defined by the Protocol, which gives default as
1 (dynamic Type).

virtual Handle_Interface_InterfaceModel Interface_InterfaceModel::NewEmptyModel ( ) const
pure virtual

Returns a New Empty Model, same type as <me> (whatever its
Type); called to Copy parts a Model into other ones, then
followed by a call to GetFromAnother (Header) then filling
with specified Entities, themselves copied

Implemented in IGESData_IGESModel, and StepData_StepModel.

virtual Standard_Integer Interface_InterfaceModel::NextNumberForLabel ( const Standard_CString  label,
const Standard_Integer  lastnum = 0,
const Standard_Boolean  exact = Standard_True 
) const
virtual

 Searches a label which matches with one entity. <br>
      Begins from <lastnum>+1 (default:1) and scans the entities <br>
      until <NbEntities>. For the first which matches <label>, <br>
      this method returns its Number. Returns 0 if nothing found <br>
      Can be called recursively (labels are not specified as unique) <br>
      <exact> : if True (default), exact match is required <br>
      else, checks the END of entity label <br>


This method is virtual, hence it can be redefined for a more
efficient search (if exact is true).

Standard_Integer Interface_InterfaceModel::Number ( const Handle< Standard_Transient > &  anentity) const

Returns the Number of an Entity in the Model if it contains it.
Else returns 0. For a ReportEntity, looks at Concerned Entity.
//! Returns the Directory entry Number of an Entity in
the Model if it contains it. Else returns 0. For a
ReportEntity, looks at Concerned Entity.

void Interface_InterfaceModel::Print ( const Handle< Standard_Transient > &  ent,
const Handle< Message_Messenger > &  s,
const Standard_Integer  mode = 0 
) const

Prints identification of a given entity in <me>, in order to
be printed in a list or phrase
<mode> < 0 : prints only its number
<mode> = 1 : just calls PrintLabel
<mode> = 0 (D) : prints its number plus '/' plus PrintLabel
If <ent> == <me>, simply prints "Global"
If <ent> is unknown, prints "??/its type"

virtual void Interface_InterfaceModel::PrintLabel ( const Handle< Standard_Transient > &  ent,
const Handle< Message_Messenger > &  S 
) const
pure virtual

Prints label specific to each norm, for a given entity.
Must only print label itself, in order to be included in a
phrase. Can call the result of StringLabel, but not obliged.

Implemented in IGESData_IGESModel, and StepData_StepModel.

virtual void Interface_InterfaceModel::PrintToLog ( const Handle< Standard_Transient > &  ent,
const Handle< Message_Messenger > &  S 
) const
virtual

Prints label specific to each norm in log format, for
a given entity.
By default, just calls PrintLabel, can be redefined

Reimplemented in IGESData_IGESModel.

virtual Handle_Interface_Protocol Interface_InterfaceModel::Protocol ( ) const
virtual

Returns the Protocol which has been set by SetProtocol, or
AddWithRefs with Protocol

Interface_EntityIterator Interface_InterfaceModel::Redefineds ( ) const

Returns the list of ReportEntities which redefine data
(generally, if concerned entity is "Error", a literal content
is added to it : this is a "redefined entity"

void Interface_InterfaceModel::ReplaceEntity ( const Standard_Integer  nument,
const Handle< Standard_Transient > &  anent 
)

Replace Entity with Number=nument on other entity - "anent"

Handle_Interface_ReportEntity Interface_InterfaceModel::ReportEntity ( const Standard_Integer  num,
const Standard_Boolean  semantic = Standard_False 
) const

 Returns a ReportEntity identified by its number in the Model, <br>
      or a Null Handle If <num> does not identify a ReportEntity. <br>


By default, queries main report, if <semantic> is True, it
queries report for semantic check

Interface_EntityIterator Interface_InterfaceModel::Reports ( const Standard_Boolean  semantic = Standard_False) const

Returns the list of all ReportEntities, i.e. data about
Entities read with Error or Warning informations
(each item has to be casted to Report Entity then it can be
queried for Concerned Entity, Content, Check ...)
By default, returns the main reports, is <semantic> is True it
returns the list for sematic checks

virtual void Interface_InterfaceModel::Reservate ( const Standard_Integer  nbent)
virtual

Does a reservation for the List of Entities (for optimized
storage management). If it is not called, storage management
can be less efficient. <nbent> is the expected count of
Entities to store

void Interface_InterfaceModel::ReverseOrders ( const Standard_Integer  after = 0)

Reverses the Numbers of the Entities, between <after> and the
total count of Entities. Thus, the entities :
1,2 ... after, after+1 ... nb-1, nb become numbered as :
1,2 ... after, nb, nb-1 ... after+1
By default (after = 0) the whole list of Entities is reversed

Standard_Boolean Interface_InterfaceModel::SetCategoryNumber ( const Standard_Integer  num,
const Standard_Integer  val 
)

Records a category number for an entity number
Returns True when done, False if <num> is out of range

void Interface_InterfaceModel::SetGlobalCheck ( const Handle< Interface_Check > &  ach)

Allows to modify GlobalCheck, after getting then completing it
Remark : it is SYNTACTIC check. Semantics, see FillChecks

void Interface_InterfaceModel::SetGTool ( const Handle< Interface_GTool > &  gtool)

Sets a GTool for this model, which already defines a Protocol

void Interface_InterfaceModel::SetProtocol ( const Handle< Interface_Protocol > &  proto)

Sets a Protocol for this Model
It is also set by a call to AddWithRefs with Protocol
It is used for : DumpHeader (as required), ClearEntities ...

Standard_Boolean Interface_InterfaceModel::SetReportEntity ( const Standard_Integer  num,
const Handle< Interface_ReportEntity > &  rep 
)

Sets or Replaces a ReportEntity for the Entity <num>. Returns <br>
     True if Report is replaced, False if it has been replaced <br>

Warning : the caller must assume that this setting is meaningfull

static Standard_Boolean Interface_InterfaceModel::SetTemplate ( const Standard_CString  name,
const Handle< Interface_InterfaceModel > &  model 
)
static

Records a new template model with a name. If the name was
already recorded, the corresponding template is replaced by
the new one. Then, WARNING : test HasTemplate to avoid
surprises

virtual Handle_TCollection_HAsciiString Interface_InterfaceModel::StringLabel ( const Handle< Standard_Transient > &  ent) const
pure virtual

Returns a string with the label attached to a given entity. <br>

Warning : While this string may be edited on the spot, if it is a read
field, the returned value must be copied before.

Implemented in IGESData_IGESModel, and StepData_StepModel.

static Handle_Interface_InterfaceModel Interface_InterfaceModel::Template ( const Standard_CString  name)
static

Returns the template model attached to a name, or a Null Handle

Handle_Standard_Type Interface_InterfaceModel::Type ( const Handle< Standard_Transient > &  ent,
const Standard_Integer  num = 1 
) const

Returns a type, given its rank : defined by the Protocol
(by default, the first one)

Standard_CString Interface_InterfaceModel::TypeName ( const Handle< Standard_Transient > &  ent,
const Standard_Boolean  complete = Standard_True 
) const

Returns the type name of an entity, from the list of types
(one or more ...)
<complete> True (D) gives the complete type, else packages are
removed
WARNING : buffered, to be immediately copied or printed

const Handle_Standard_Transient& Interface_InterfaceModel::Value ( const Standard_Integer  num) const

 Returns an Entity identified by its number in the Model <br>
      Each sub-class of InterfaceModel can define its own method <br>
      Entity to return its specific class of Entity (e.g. for VDA, <br>
      VDAModel returns a VDAEntity), working by calling Value <br>

Remark : For a Reported Entity, (Erroneous, Corrected, Unknown), this
method returns this Reported Entity.
See ReportEntity for other questions.

virtual void Interface_InterfaceModel::VerifyCheck ( Handle< Interface_Check > &  ach) const
virtual

Minimum Semantic Global Check on data in model (header)
Can only check basic Data. See also GlobalCheck from Protocol
for a check which takes the Graph into account
Default does nothing, can be redefined

Reimplemented in IGESData_IGESModel, and StepData_StepModel.


The documentation for this class was generated from the following file: