Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
IFSelect_ShareOut Class Reference

This class gathers the information required to produce one or several file(s) from the content of an InterfaceModel (passing through the creation of intermediate Models). More...

#include <IFSelect_ShareOut.hxx>

Inheritance diagram for IFSelect_ShareOut:
Inheritance graph
[legend]

Public Member Functions

 IFSelect_ShareOut ()
 Creates an empty ShareOut.
 
void Clear (const bool onlydisp)
 Removes in one operation all the Dispatches with their Idents Also clears all information about Names, and all Results but naming information which are :
 
void ClearResult (const bool alsoname)
 Clears all data produced (apart from Dispatches, etc...) if <alsoname> is True, all is cleared. Else, information about produced Names are kept (to maintain unicity of naming across clearings)
 
bool RemoveItem (const occ::handle< Standard_Transient > &item)
 Removes an item, which can be, either a Dispatch (removed from the list of Dispatches), or a GeneralModifier (removed from the list of Model Modifiers or from the list of File Modifiers according to its type). Returns True if done, False if has not been found or if it is neither a Dispatch, nor a Modifier.
 
int LastRun () const
 Returns the rank of last run item (ClearResult resets it to 0)
 
void SetLastRun (const int last)
 Records a new value for the rank of last run item.
 
int NbDispatches () const
 Returns the count of Dispatches.
 
int DispatchRank (const occ::handle< IFSelect_Dispatch > &disp) const
 Returns the Rank of a Dispatch, given its Value (Handle). Returns 0 if the Dispatch is unknown in the ShareOut.
 
const occ::handle< IFSelect_Dispatch > & Dispatch (const int num) const
 Returns a Dispatch, given its rank in the list.
 
void AddDispatch (const occ::handle< IFSelect_Dispatch > &disp)
 Adds a Dispatch to the list.
 
bool RemoveDispatch (const int rank)
 Removes a Dispatch, given its rank in the list Returns True if done, False if rank is not between (LastRun + 1) and (NbDispatches)
 
void AddModifier (const occ::handle< IFSelect_GeneralModifier > &modifier, const int atnum)
 Sets a Modifier to be applied on all Dispatches to be run If <modifier> is a ModelModifier, adds it to the list of Model Modifiers; else to the list of File Modifiers By default (atnum = 0) at the end of the list, else at <atnum> Each Modifier is used, after each copy of a packet of Entities into a Model : its criteria are checked and if they are OK, the method Perform of this Modifier is run.
 
void AddModifier (const occ::handle< IFSelect_GeneralModifier > &modifier, const int dispnum, const int atnum)
 Sets a Modifier to be applied on the Dispatch <dispnum> If <modifier> is a ModelModifier, adds it to the list of Model Modifiers; else to the list of File Modifiers This is the same list as for all Dispatches, but the Modifier is qualified to be applied to one Dispatch only Then, <atnum> refers to the entire list By default (atnum = 0) at the end of the list, else at <atnum> Remark : if the Modifier was already in the list and if <atnum> = 0, the Modifier is not moved, but only qualified for a Dispatch.
 
void AddModif (const occ::handle< IFSelect_GeneralModifier > &modifier, const bool formodel, const int atnum=0)
 Adds a Modifier to the list of Modifiers : Model Modifiers if <formodel> is True, File Modifiers else (internal).
 
int NbModifiers (const bool formodel) const
 Returns count of Modifiers (which apply to complete Models) : Model Modifiers if <formodel> is True, File Modifiers else.
 
occ::handle< IFSelect_GeneralModifierGeneralModifier (const bool formodel, const int num) const
 Returns a Modifier of the list, given its rank : Model Modifiers if <formodel> is True, File Modifiers else.
 
occ::handle< IFSelect_ModifierModelModifier (const int num) const
 Returns a Modifier of the list of Model Modifiers, duely casted.
 
int ModifierRank (const occ::handle< IFSelect_GeneralModifier > &modifier) const
 Gives the rank of a Modifier in the list, 0 if not in the list Model Modifiers if <modifier> is kind of ModelModifer, File Modifiers else.
 
bool RemoveModifier (const bool formodel, const int num)
 Removes a Modifier, given it rank in the list : Model Modifiers if <formodel> is True, File Modifiers else Returns True if done, False if <num> is out of range.
 
bool ChangeModifierRank (const bool formodel, const int befor, const int after)
 Changes the rank of a modifier in the list : Model Modifiers if <formodel> is True, File Modifiers else from <before> to <after> Returns True if done, False else (before or after out of range)
 
bool SetRootName (const int num, const occ::handle< TCollection_HAsciiString > &name)
 Attaches a Root Name to a Dispatch given its rank, as an HAsciiString (standard form). A Null Handle resets this name. Returns True if OK, False if this Name is already attached, for a Dispatch or for Default, or <num> out of range.
 
bool HasRootName (const int num) const
 Returns True if the Dispatch of rank <num> has an attached Root Name. False else, or if num is out of range.
 
occ::handle< TCollection_HAsciiStringRootName (const int num) const
 Returns the Root bound to a Dispatch, given its rank Returns a Null Handle if not defined.
 
int RootNumber (const occ::handle< TCollection_HAsciiString > &name) const
 Returns an integer value about a given root name :
 
void SetPrefix (const occ::handle< TCollection_HAsciiString > &pref)
 Defines or Changes the general Prefix (which is prepended to complete file name generated). If this method is not call, Prefix remains empty.
 
bool SetDefaultRootName (const occ::handle< TCollection_HAsciiString > &defrt)
 Defines or Changes the Default Root Name to a new value (which is used for dispatches which have no attached root name). If this method is not called, DefaultRootName remains empty Returns True if OK, False if this Name is already attached, for a Dispatch or for Default.
 
void SetExtension (const occ::handle< TCollection_HAsciiString > &ext)
 Defines or Changes the general Extension (which is appended to complete file name generated). If this method is not call, Extension remains empty.
 
occ::handle< TCollection_HAsciiStringPrefix () const
 Returns the general Prefix. Can be empty.
 
occ::handle< TCollection_HAsciiStringDefaultRootName () const
 Returns the Default Root Name. Can be empty.
 
occ::handle< TCollection_HAsciiStringExtension () const
 Returns the general Extension. Can be empty (not recommended)
 
TCollection_AsciiString FileName (const int dnum, const int pnum, const int nbpack=0)
 Computes the complete file name for a Packet of a Dispatch, given Dispatch Number (Rank), Packet Number, and Count of Packets generated by this Dispatch (0 if unknown)
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool IsKind (const opencascade::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.
 
bool IsKind (const char *const 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.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Detailed Description

This class gathers the information required to produce one or several file(s) from the content of an InterfaceModel (passing through the creation of intermediate Models).

It can correspond to a complete Divide up of a set of Entities intended to be exhaustive and to limit duplications. Or to a simple Extraction of some Entities, in order to work on them.

A ShareOut is composed of a list of Dispatches. To Each Dispatch in the ShareOut, is bound an Id. Number This Id. Number allows to identify a Display inside the ShareOut in a stable way (for instance, to attach file names)

ShareOut can be seen as a "passive" description, activated through a ShareOutResult, which gives the InterfaceModel on which to work, as a unique source. Thus it is easy to change it without coherence problems

Services about it are provided by the class ShareOutResult which is a service class : simulation (list of files and of entities per file; "forgotten" entities; duplicated entities), exploitation (generation of derivated Models, each of them generating an output file)

Constructor & Destructor Documentation

◆ IFSelect_ShareOut()

IFSelect_ShareOut::IFSelect_ShareOut ( )

Creates an empty ShareOut.

Member Function Documentation

◆ AddDispatch()

void IFSelect_ShareOut::AddDispatch ( const occ::handle< IFSelect_Dispatch > & disp)

Adds a Dispatch to the list.

◆ AddModif()

void IFSelect_ShareOut::AddModif ( const occ::handle< IFSelect_GeneralModifier > & modifier,
const bool formodel,
const int atnum = 0 )

Adds a Modifier to the list of Modifiers : Model Modifiers if <formodel> is True, File Modifiers else (internal).

◆ AddModifier() [1/2]

void IFSelect_ShareOut::AddModifier ( const occ::handle< IFSelect_GeneralModifier > & modifier,
const int atnum )

Sets a Modifier to be applied on all Dispatches to be run If <modifier> is a ModelModifier, adds it to the list of Model Modifiers; else to the list of File Modifiers By default (atnum = 0) at the end of the list, else at <atnum> Each Modifier is used, after each copy of a packet of Entities into a Model : its criteria are checked and if they are OK, the method Perform of this Modifier is run.

◆ AddModifier() [2/2]

void IFSelect_ShareOut::AddModifier ( const occ::handle< IFSelect_GeneralModifier > & modifier,
const int dispnum,
const int atnum )

Sets a Modifier to be applied on the Dispatch <dispnum> If <modifier> is a ModelModifier, adds it to the list of Model Modifiers; else to the list of File Modifiers This is the same list as for all Dispatches, but the Modifier is qualified to be applied to one Dispatch only Then, <atnum> refers to the entire list By default (atnum = 0) at the end of the list, else at <atnum> Remark : if the Modifier was already in the list and if <atnum> = 0, the Modifier is not moved, but only qualified for a Dispatch.

◆ ChangeModifierRank()

bool IFSelect_ShareOut::ChangeModifierRank ( const bool formodel,
const int befor,
const int after )

Changes the rank of a modifier in the list : Model Modifiers if <formodel> is True, File Modifiers else from <before> to <after> Returns True if done, False else (before or after out of range)

◆ Clear()

void IFSelect_ShareOut::Clear ( const bool onlydisp)

Removes in one operation all the Dispatches with their Idents Also clears all information about Names, and all Results but naming information which are :

  • kept if <onlydisp> is True.
  • cleared if <onlydisp> is False (complete clearing) If <onlydisp> is True, that's all. Else, clears also Modifiers

◆ ClearResult()

void IFSelect_ShareOut::ClearResult ( const bool alsoname)

Clears all data produced (apart from Dispatches, etc...) if <alsoname> is True, all is cleared. Else, information about produced Names are kept (to maintain unicity of naming across clearings)

◆ DefaultRootName()

occ::handle< TCollection_HAsciiString > IFSelect_ShareOut::DefaultRootName ( ) const

Returns the Default Root Name. Can be empty.

◆ Dispatch()

const occ::handle< IFSelect_Dispatch > & IFSelect_ShareOut::Dispatch ( const int num) const

Returns a Dispatch, given its rank in the list.

◆ DispatchRank()

int IFSelect_ShareOut::DispatchRank ( const occ::handle< IFSelect_Dispatch > & disp) const

Returns the Rank of a Dispatch, given its Value (Handle). Returns 0 if the Dispatch is unknown in the ShareOut.

◆ Extension()

occ::handle< TCollection_HAsciiString > IFSelect_ShareOut::Extension ( ) const

Returns the general Extension. Can be empty (not recommended)

◆ FileName()

TCollection_AsciiString IFSelect_ShareOut::FileName ( const int dnum,
const int pnum,
const int nbpack = 0 )

Computes the complete file name for a Packet of a Dispatch, given Dispatch Number (Rank), Packet Number, and Count of Packets generated by this Dispatch (0 if unknown)

File Name is made of following strings, concatenated : General Prefix, Root Name for Dispatch, Packet Suffix, and General Extension. If no Root Name is specified for a Dispatch, DefaultRootName is considered (and pnum is not used, but <thenbdefs> is incremented and used Error if no Root is defined for this <idnum>

◆ GeneralModifier()

occ::handle< IFSelect_GeneralModifier > IFSelect_ShareOut::GeneralModifier ( const bool formodel,
const int num ) const

Returns a Modifier of the list, given its rank : Model Modifiers if <formodel> is True, File Modifiers else.

◆ HasRootName()

bool IFSelect_ShareOut::HasRootName ( const int num) const

Returns True if the Dispatch of rank <num> has an attached Root Name. False else, or if num is out of range.

◆ LastRun()

int IFSelect_ShareOut::LastRun ( ) const

Returns the rank of last run item (ClearResult resets it to 0)

◆ ModelModifier()

occ::handle< IFSelect_Modifier > IFSelect_ShareOut::ModelModifier ( const int num) const

Returns a Modifier of the list of Model Modifiers, duely casted.

◆ ModifierRank()

int IFSelect_ShareOut::ModifierRank ( const occ::handle< IFSelect_GeneralModifier > & modifier) const

Gives the rank of a Modifier in the list, 0 if not in the list Model Modifiers if <modifier> is kind of ModelModifer, File Modifiers else.

◆ NbDispatches()

int IFSelect_ShareOut::NbDispatches ( ) const

Returns the count of Dispatches.

◆ NbModifiers()

int IFSelect_ShareOut::NbModifiers ( const bool formodel) const

Returns count of Modifiers (which apply to complete Models) : Model Modifiers if <formodel> is True, File Modifiers else.

◆ Prefix()

occ::handle< TCollection_HAsciiString > IFSelect_ShareOut::Prefix ( ) const

Returns the general Prefix. Can be empty.

◆ RemoveDispatch()

bool IFSelect_ShareOut::RemoveDispatch ( const int rank)

Removes a Dispatch, given its rank in the list Returns True if done, False if rank is not between (LastRun + 1) and (NbDispatches)

◆ RemoveItem()

bool IFSelect_ShareOut::RemoveItem ( const occ::handle< Standard_Transient > & item)

Removes an item, which can be, either a Dispatch (removed from the list of Dispatches), or a GeneralModifier (removed from the list of Model Modifiers or from the list of File Modifiers according to its type). Returns True if done, False if has not been found or if it is neither a Dispatch, nor a Modifier.

◆ RemoveModifier()

bool IFSelect_ShareOut::RemoveModifier ( const bool formodel,
const int num )

Removes a Modifier, given it rank in the list : Model Modifiers if <formodel> is True, File Modifiers else Returns True if done, False if <num> is out of range.

◆ RootName()

occ::handle< TCollection_HAsciiString > IFSelect_ShareOut::RootName ( const int num) const

Returns the Root bound to a Dispatch, given its rank Returns a Null Handle if not defined.

◆ RootNumber()

int IFSelect_ShareOut::RootNumber ( const occ::handle< TCollection_HAsciiString > & name) const

Returns an integer value about a given root name :

  • positive : it's the rank of the Dispatch which has this name
  • null : this root name is unknown
  • negative (-1) : this root name is the default root name

◆ SetDefaultRootName()

bool IFSelect_ShareOut::SetDefaultRootName ( const occ::handle< TCollection_HAsciiString > & defrt)

Defines or Changes the Default Root Name to a new value (which is used for dispatches which have no attached root name). If this method is not called, DefaultRootName remains empty Returns True if OK, False if this Name is already attached, for a Dispatch or for Default.

◆ SetExtension()

void IFSelect_ShareOut::SetExtension ( const occ::handle< TCollection_HAsciiString > & ext)

Defines or Changes the general Extension (which is appended to complete file name generated). If this method is not call, Extension remains empty.

◆ SetLastRun()

void IFSelect_ShareOut::SetLastRun ( const int last)

Records a new value for the rank of last run item.

◆ SetPrefix()

void IFSelect_ShareOut::SetPrefix ( const occ::handle< TCollection_HAsciiString > & pref)

Defines or Changes the general Prefix (which is prepended to complete file name generated). If this method is not call, Prefix remains empty.

◆ SetRootName()

bool IFSelect_ShareOut::SetRootName ( const int num,
const occ::handle< TCollection_HAsciiString > & name )

Attaches a Root Name to a Dispatch given its rank, as an HAsciiString (standard form). A Null Handle resets this name. Returns True if OK, False if this Name is already attached, for a Dispatch or for Default, or <num> out of range.


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