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

# DataExchange
TKXSBase
Interface

# Interface_GeneralModule Class Reference

This class defines general services, which must be provided
for each type of Entity (i.e. of Transient Object processed
by an Interface) : Shared List, Check, Copy, Delete, Category
To optimise processing (e.g. firstly bind an Entity to a Module
then calls Module), each recognized Entity Type corresponds
to a Case Number, determined by the Protocol each class of
GeneralModule belongs to.
.

`#include <Interface_GeneralModule.hxx>`

Inheritance diagram for Interface_GeneralModule:

[legend]

## Public Member Functions
virtual Standard_EXPORT void | FillShared (const Handle(Interface_InterfaceModel)&model, const Standard_Integer CN, const Handle(Standard_Transient)&ent, Interface_EntityIterator &iter) const
| Specific filling of the list of Entities shared by an Entity <ent>, according a Case Number <cn> (formerly computed by CaseNum), considered in the context of a Model <model> Default calls FillSharedCase (i.e., ignores the model) Can be redefined to use the model for working .
virtual Standard_EXPORT void | FillSharedCase (const Standard_Integer CN, const Handle(Standard_Transient)&ent, Interface_EntityIterator &iter) const =0
| Specific filling of the list of Entities shared by an Entity <ent>, according a Case Number <cn> (formerly computed by CaseNum). Can use the internal utility method Share, below .
Standard_EXPORT void | Share (Interface_EntityIterator &iter, const Handle(Standard_Transient)&shared) const
| Adds an Entity to a Shared List (uses GetOneItem on <iter>) .
virtual Standard_EXPORT void | ListImplied (const Handle(Interface_InterfaceModel)&model, const Standard_Integer CN, const Handle(Standard_Transient)&ent, Interface_EntityIterator &iter) const
| List the Implied References of <ent> considered in the context of a Model <model> : i.e. the Entities which are Referenced while not considered as Shared (not copied if <ent> is, references not renewed by CopyCase but by ImpliedCase, only if referenced Entities have been Copied too) FillShared + ListImplied give the complete list of References Default calls ListImpliedCase (i.e. ignores the model) Can be redefined to use the model for working .
virtual Standard_EXPORT void | ListImpliedCase (const Standard_Integer CN, const Handle(Standard_Transient)&ent, Interface_EntityIterator &iter) const
| List the Implied References of <ent> (see above) are Referenced while not considered as Shared (not copied if <ent> is, references not renewed by CopyCase but by ImpliedCase, only if referenced Entities have been Copied too) FillSharedCase + ListImpliedCase give the complete list of Referenced Entities The provided default method does nothing (Implied References are specific of a little amount of Entity Classes). .
virtual Standard_EXPORT void | CheckCase (const Standard_Integer CN, const Handle(Standard_Transient)&ent, const Interface_ShareTool &shares, Handle(Interface_Check)&ach) const =0
| Specific Checking of an Entity <ent> Can check context queried through a ShareTool, as required .
virtual Standard_EXPORT Standard_Boolean | CanCopy (const Standard_Integer CN, const Handle(Standard_Transient)&ent) const
| Specific answer to the question "is Copy properly implemented" Remark that it should be in phase with the implementation of NewVoid+CopyCase/NewCopyCase Default returns always False, can be redefined .
virtual Standard_EXPORT Standard_Boolean | Dispatch (const Standard_Integer CN, const Handle(Standard_Transient)&entfrom, Handle(Standard_Transient)&entto, Interface_CopyTool &TC) const
| Dispatches an entity Returns True if it works by copy, False if it just duplicates the starting Handle Dispatching means producing a new entity, image of the starting one, in order to be put into a new Model, this Model being itself the result of a dispatch from an original Model According to the cases, dispatch can either * just return <entto> as equating <entfrom> -> the new model designates the starting entity : it is lighter, but the dispatched entity being shared might not be modified for dispatch * copy <entfrom> to <entto> by calling NewVoid+CopyCase (two steps) or NewCopiedCase (1) -> the dispatched entity is a COPY, hence it can be modified The provided default just duplicates the handle without copying, then returns False. Can be redefined .
virtual Standard_EXPORT Standard_Boolean | NewVoid (const Standard_Integer CN, Handle(Standard_Transient)&entto) const =0
| Creates a new void entity <entto> according to a Case Number This entity remains to be filled, by reading from a file or by copying from another entity of same type (see CopyCase) .
virtual Standard_EXPORT void | CopyCase (const Standard_Integer CN, const Handle(Standard_Transient)&entfrom, const Handle(Standard_Transient)&entto, Interface_CopyTool &TC) const =0
| Specific Copy ("Deep") from <entfrom> to <entto> (same type) by using a CopyTool which provides its working Map. Use method Transferred from CopyTool to work .
virtual Standard_EXPORT Standard_Boolean | NewCopiedCase (const Standard_Integer CN, const Handle(Standard_Transient)&entfrom, Handle(Standard_Transient)&entto, Interface_CopyTool &TC) const
| Specific operator (create+copy) defaulted to do nothing. It can be redefined : When it is not possible to work in two steps (NewVoid then CopyCase). This can occur when there is no default constructor : hence the result <entto> must be created with an effective definition. Remark : if NewCopiedCase is defined, CopyCase has nothing to do Returns True if it has produced something, false else .
virtual Standard_EXPORT void | RenewImpliedCase (const Standard_Integer CN, const Handle(Standard_Transient)&entfrom, const Handle(Standard_Transient)&entto, const Interface_CopyTool &TC) const
| Specific Copying of Implied References A Default is provided which does nothing (must current case !) Already copied references (by CopyFrom) must remain unchanged Use method Search from CopyTool to work .
virtual Standard_EXPORT void | WhenDeleteCase (const Standard_Integer CN, const Handle(Standard_Transient)&ent, const Standard_Boolean dispatched) const
| Prepares an entity to be deleted. What does it mean : Basically, any class of entity may define its own destructor By default, it does nothing but calling destructors on fields With the Memory Manager, it is useless to call destructor, it is done automatically when the Handle is nullified(cleared) BUT this is ineffective in looping structures (whatever these are "Implied" references or not). THUS : if no loop may appear in definitions, a class which inherits from TShared is correctly managed by automatic way BUT if there can be loops (or simply back pointers), they must be broken, for instance by clearing fields of one of the nodes The default does nothing, to be redefined if a loop can occur (Implied generally requires WhenDelete, but other cases can occur) Warning : <dispatched> tells if the entity to be deleted has been produced by Dispatch or not. Hence WhenDelete must be in coherence with Dispatch Dispatch can either copy or not. If it copies the entity, this one should be deleted If it doesnt (i.e. duplicates the handle) nothing to do If <dispatch> is False, normal deletion is to be performed .
virtual Standard_EXPORT Standard_Integer | CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)&ent, const Interface_ShareTool &shares) const
| Returns a category number which characterizes an entity Category Numbers are managed by the class Category <shares> can be used to evaluate this number in the context Default returns 0 which means "unspecified" .
virtual Standard_EXPORT Handle_TCollection_HAsciiString | Name (const Standard_Integer CN, const Handle(Standard_Transient)&ent, const Interface_ShareTool &shares) const
| Determines if an entity brings a Name (or widerly, if a Name can be attached to it, through the ShareTool By default, returns a Null Handle (no name can be produced) Can be redefined Warning : While this string may be edited on the spot, if it is a read field, the returned value must be copied before. .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Member Function Documentation

virtual Standard_EXPORT Standard_Boolean Interface_GeneralModule::CanCopy | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | ent
| ) | const`[virtual]`

| Reimplemented in IGESData_GeneralModule.

virtual Standard_EXPORT Standard_Integer Interface_GeneralModule::CategoryNumber | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | ent,
|  | const Interface_ShareTool & | shares
| ) | const`[virtual]`

| Reimplemented in IGESAppli_GeneralModule, IGESBasic_GeneralModule, IGESDefs_GeneralModule, IGESDimen_GeneralModule, IGESDraw_GeneralModule, IGESGeom_GeneralModule, IGESGraph_GeneralModule, IGESSolid_GeneralModule, and RWStepAP214_GeneralModule.

virtual Standard_EXPORT void Interface_GeneralModule::CheckCase | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | ent,
|  | const Interface_ShareTool & | shares,
|  | Handle(Interface_Check)& | ach
| ) | const`[pure virtual]`

| Implemented in IGESData_GeneralModule, RWHeaderSection_GeneralModule, RWStepAP214_GeneralModule, StepData_DefaultGeneral, StepData_DescrGeneral, and StepData_GeneralModule.

virtual Standard_EXPORT void Interface_GeneralModule::CopyCase | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | entfrom,
|  | const Handle(Standard_Transient)& | entto,
|  | Interface_CopyTool & | TC
| ) | const`[pure virtual]`

| Implemented in IGESData_GeneralModule, RWHeaderSection_GeneralModule, RWStepAP214_GeneralModule, StepData_DefaultGeneral, StepData_DescrGeneral, and StepData_GeneralModule.

virtual Standard_EXPORT Standard_Boolean Interface_GeneralModule::Dispatch | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | entfrom,
|  | Handle(Standard_Transient)& | entto,
|  | Interface_CopyTool & | TC
| ) | const`[virtual]`

virtual Standard_EXPORT void Interface_GeneralModule::FillShared | ( | const Handle(Interface_InterfaceModel)& | model,
|  | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | ent,
|  | Interface_EntityIterator & | iter
| ) | const`[virtual]`

virtual Standard_EXPORT void Interface_GeneralModule::FillSharedCase | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | ent,
|  | Interface_EntityIterator & | iter
| ) | const`[pure virtual]`

| Implemented in IGESData_GeneralModule, RWHeaderSection_GeneralModule, RWStepAP214_GeneralModule, StepData_DefaultGeneral, StepData_DescrGeneral, and StepData_GeneralModule.

Standard_EXPORT const Interface_GeneralModule::Handle | ( | Standard_Type |  | ) | const

| Reimplemented in IGESAppli_GeneralModule, IGESBasic_GeneralModule, IGESData_DefaultGeneral, IGESData_GeneralModule, IGESDefs_GeneralModule, IGESDimen_GeneralModule, IGESDraw_GeneralModule, IGESGeom_GeneralModule, IGESGraph_GeneralModule, IGESSolid_GeneralModule, RWHeaderSection_GeneralModule, RWStepAP214_GeneralModule, StepData_DefaultGeneral, StepData_DescrGeneral, and StepData_GeneralModule.

virtual Standard_EXPORT void Interface_GeneralModule::ListImplied | ( | const Handle(Interface_InterfaceModel)& | model,
|  | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | ent,
|  | Interface_EntityIterator & | iter
| ) | const`[virtual]`

virtual Standard_EXPORT void Interface_GeneralModule::ListImpliedCase | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | ent,
|  | Interface_EntityIterator & | iter
| ) | const`[virtual]`

| Reimplemented in IGESData_GeneralModule.

virtual Standard_EXPORT Handle_TCollection_HAsciiString Interface_GeneralModule::Name | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | ent,
|  | const Interface_ShareTool & | shares
| ) | const`[virtual]`

| Reimplemented in IGESData_GeneralModule, and RWStepAP214_GeneralModule.

virtual Standard_EXPORT Standard_Boolean Interface_GeneralModule::NewCopiedCase | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | entfrom,
|  | Handle(Standard_Transient)& | entto,
|  | Interface_CopyTool & | TC
| ) | const`[virtual]`

virtual Standard_EXPORT Standard_Boolean Interface_GeneralModule::NewVoid | ( | const Standard_Integer | CN,
|  | Handle(Standard_Transient)& | entto
| ) | const`[pure virtual]`

| Implemented in IGESAppli_GeneralModule, IGESBasic_GeneralModule, IGESData_DefaultGeneral, IGESData_GeneralModule, IGESDefs_GeneralModule, IGESDimen_GeneralModule, IGESDraw_GeneralModule, IGESGeom_GeneralModule, IGESGraph_GeneralModule, IGESSolid_GeneralModule, RWHeaderSection_GeneralModule, RWStepAP214_GeneralModule, StepData_DefaultGeneral, and StepData_DescrGeneral.

virtual Standard_EXPORT void Interface_GeneralModule::RenewImpliedCase | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | entfrom,
|  | const Handle(Standard_Transient)& | entto,
|  | const Interface_CopyTool & | TC
| ) | const`[virtual]`

| Reimplemented in IGESData_GeneralModule.

Standard_EXPORT void Interface_GeneralModule::Share | ( | Interface_EntityIterator & | iter,
|  | const Handle(Standard_Transient)& | shared
| ) | const

virtual Standard_EXPORT void Interface_GeneralModule::WhenDeleteCase | ( | const Standard_Integer | CN,
|  | const Handle(Standard_Transient)& | ent,
|  | const Standard_Boolean | dispatched
| ) | const`[virtual]`

| Reimplemented in IGESData_GeneralModule.

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

- Interface_GeneralModule.hxx