Open CASCADE Technology  7.2.0
Public Member Functions | Static Public Member Functions
Interface_GeneralLib Class Reference

#include <Interface_GeneralLib.hxx>

Public Member Functions

 Interface_GeneralLib (const Handle< Interface_Protocol > &aprotocol)
 Creates a Library which complies with a Protocol, that is : Same class (criterium IsInstance) This creation gets the Modules from the global set, those which are bound to the given Protocol and its Resources. More...
 
 Interface_GeneralLib ()
 Creates an empty Library : it will later by filled by method AddProtocol. More...
 
void AddProtocol (const Handle< Standard_Transient > &aprotocol)
 Adds a couple (Module-Protocol) to the Library, given the class of a Protocol. Takes Resources into account. (if <aprotocol> is not of type TheProtocol, it is not added) More...
 
void Clear ()
 Clears the list of Modules of a library (can be used to redefine the order of Modules before action : Clear then refill the Library by calls to AddProtocol) More...
 
void SetComplete ()
 Sets a library to be defined with the complete Global list (all the couples Protocol/Modules recorded in it) More...
 
Standard_Boolean Select (const Handle< Standard_Transient > &obj, Handle< Interface_GeneralModule > &module, Standard_Integer &CN) const
 Selects a Module from the Library, given an Object. Returns True if Select has succeeded, False else. Also Returns (as arguments) the selected Module and the Case Number determined by the associated Protocol. If Select has failed, <module> is Null Handle and CN is zero. (Select can work on any criterium, such as Object DynamicType) More...
 
void Start ()
 Starts Iteration on the Modules (sets it on the first one) More...
 
Standard_Boolean More () const
 Returns True if there are more Modules to iterate on. More...
 
void Next ()
 Iterates by getting the next Module in the list If there is none, the exception will be raised by Value. More...
 
const Handle< Interface_GeneralModule > & Module () const
 Returns the current Module in the Iteration. More...
 
const Handle< Interface_Protocol > & Protocol () const
 Returns the current Protocol in the Iteration. More...
 

Static Public Member Functions

static void SetGlobal (const Handle< Interface_GeneralModule > &amodule, const Handle< Interface_Protocol > &aprotocol)
 Adds a couple (Module-Protocol) into the global definition set for this class of Library. More...
 

Constructor & Destructor Documentation

◆ Interface_GeneralLib() [1/2]

Interface_GeneralLib::Interface_GeneralLib ( const Handle< Interface_Protocol > &  aprotocol)

Creates a Library which complies with a Protocol, that is : Same class (criterium IsInstance) This creation gets the Modules from the global set, those which are bound to the given Protocol and its Resources.

◆ Interface_GeneralLib() [2/2]

Interface_GeneralLib::Interface_GeneralLib ( )

Creates an empty Library : it will later by filled by method AddProtocol.

Member Function Documentation

◆ AddProtocol()

void Interface_GeneralLib::AddProtocol ( const Handle< Standard_Transient > &  aprotocol)

Adds a couple (Module-Protocol) to the Library, given the class of a Protocol. Takes Resources into account. (if <aprotocol> is not of type TheProtocol, it is not added)

◆ Clear()

void Interface_GeneralLib::Clear ( )

Clears the list of Modules of a library (can be used to redefine the order of Modules before action : Clear then refill the Library by calls to AddProtocol)

◆ Module()

const Handle< Interface_GeneralModule >& Interface_GeneralLib::Module ( ) const

Returns the current Module in the Iteration.

◆ More()

Standard_Boolean Interface_GeneralLib::More ( ) const

Returns True if there are more Modules to iterate on.

◆ Next()

void Interface_GeneralLib::Next ( )

Iterates by getting the next Module in the list If there is none, the exception will be raised by Value.

◆ Protocol()

const Handle< Interface_Protocol >& Interface_GeneralLib::Protocol ( ) const

Returns the current Protocol in the Iteration.

◆ Select()

Standard_Boolean Interface_GeneralLib::Select ( const Handle< Standard_Transient > &  obj,
Handle< Interface_GeneralModule > &  module,
Standard_Integer CN 
) const

Selects a Module from the Library, given an Object. Returns True if Select has succeeded, False else. Also Returns (as arguments) the selected Module and the Case Number determined by the associated Protocol. If Select has failed, <module> is Null Handle and CN is zero. (Select can work on any criterium, such as Object DynamicType)

◆ SetComplete()

void Interface_GeneralLib::SetComplete ( )

Sets a library to be defined with the complete Global list (all the couples Protocol/Modules recorded in it)

◆ SetGlobal()

static void Interface_GeneralLib::SetGlobal ( const Handle< Interface_GeneralModule > &  amodule,
const Handle< Interface_Protocol > &  aprotocol 
)
static

Adds a couple (Module-Protocol) into the global definition set for this class of Library.

◆ Start()

void Interface_GeneralLib::Start ( )

Starts Iteration on the Modules (sets it on the first one)


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