Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Data Fields
DE_ConfigurationNode Class Referenceabstract

Base class to work with CAD transfer properties. Stores the necessary settings for a single Provider type. Configures and creates special provider to transfer CAD files. More...

#include <DE_ConfigurationNode.hxx>

Inheritance diagram for DE_ConfigurationNode:
Inheritance graph
[legend]

Data Structures

struct  DE_SectionGlobal
 < Internal parameters for transfer process More...
 

Public Member Functions

 DE_ConfigurationNode ()
 Initializes all field by default.
 
 DE_ConfigurationNode (const occ::handle< DE_ConfigurationNode > &theConfigurationNode)
 Copies values of all fields.
 
virtual bool Load (const TCollection_AsciiString &theResourcePath="")
 Updates values according the resource file.
 
virtual bool Load (const occ::handle< DE_ConfigurationContext > &theResource)=0
 Updates values according the resource.
 
bool Save (const TCollection_AsciiString &theResourcePath) const
 Writes configuration to the resource file.
 
virtual TCollection_AsciiString Save () const =0
 Writes configuration to the string.
 
virtual occ::handle< DE_ProviderBuildProvider ()=0
 Creates new provider for the own format.
 
virtual occ::handle< DE_ConfigurationNodeCopy () const =0
 Copies values of all fields.
 
virtual bool UpdateLoad (const bool theToImport, const bool theToKeep)
 Update loading status. Checking for the ability to read and write.
 
virtual bool IsImportSupported () const
 Checks for import support.
 
virtual bool IsExportSupported () const
 Checks for export support.
 
virtual bool IsStreamSupported () const
 Checks for stream support.
 
virtual TCollection_AsciiString GetFormat () const =0
 Gets CAD format name of associated provider.
 
virtual TCollection_AsciiString GetVendor () const =0
 Gets provider's vendor name of associated provider.
 
virtual NCollection_List< TCollection_AsciiStringGetExtensions () const =0
 Gets list of supported file extensions.
 
virtual bool CheckExtension (const TCollection_AsciiString &theExtension) const
 Checks the file extension to verify a format.
 
virtual bool CheckContent (const occ::handle< NCollection_Buffer > &theBuffer) const
 Checks the file content to verify a format.
 
bool IsEnabled () const
 Gets the provider loading status.
 
void SetEnabled (const bool theIsLoaded)
 Sets the provider loading status.
 
virtual void CustomActivation (const NCollection_List< TCollection_AsciiString > &)
 Custom function to activate commercial DE component. The input is special sequence of values that described in specific component documentation. Order is important. Each component can have own way of activation.
 
virtual void Register (const occ::handle< DE_Wrapper > &theWrapper) const
 Registers configuration node with the specified wrapper.
 
virtual void UnRegister (const occ::handle< DE_Wrapper > &theWrapper) const
 Unregisters configuration node from the specified wrapper.
 
- 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.
 

Data Fields

struct DE_ConfigurationNode::DE_SectionGlobal GlobalParameters
 

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

Base class to work with CAD transfer properties. Stores the necessary settings for a single Provider type. Configures and creates special provider to transfer CAD files.

Nodes are grouped by Vendor's name and Format type. The Vendor name is not defined by default. The Format type is not defined by default. The supported CAD extensions are not defined by default. The import process is not supported. The export process is not supported.

The algorithm for standalone transfer operation: 1) Create new empty Node object 2) Configure the current Node 2.1) Use the external resource file to configure (Load) 2.2) Change the internal parameters directly: 2.2.1) Change field values of "GlobalParameters" 2.2.2) Change field values of "InternalParameters" 3) Create one-time transfer provider (BuildProvider) 4) Initiate the transfer process: 4.1) Import (if "::IsImportSupported: returns TRUE) 4.1.1) Validate the support of input format (::CheckContent or ::CheckExtension) 4.1.2) Use created provider's "::Read" method 4.2) Export (if "IsExportSupported: returns TRUE) 4.2.1) Use created provider's "::Write" method 5) Check the provider's output

Constructor & Destructor Documentation

◆ DE_ConfigurationNode() [1/2]

DE_ConfigurationNode::DE_ConfigurationNode ( )

Initializes all field by default.

◆ DE_ConfigurationNode() [2/2]

DE_ConfigurationNode::DE_ConfigurationNode ( const occ::handle< DE_ConfigurationNode > & theConfigurationNode)

Copies values of all fields.

Parameters
[in]theConfigurationNodeobject to copy

Member Function Documentation

◆ BuildProvider()

virtual occ::handle< DE_Provider > DE_ConfigurationNode::BuildProvider ( )
pure virtual

◆ CheckContent()

virtual bool DE_ConfigurationNode::CheckContent ( const occ::handle< NCollection_Buffer > & theBuffer) const
virtual

Checks the file content to verify a format.

Parameters
[in]theBufferread stream buffer to check content
Returns
true if file is supported by a current provider

Reimplemented in DEBREP_ConfigurationNode, DEXCAF_ConfigurationNode, DEIGES_ConfigurationNode, DEPLY_ConfigurationNode, DESTEP_ConfigurationNode, and DESTL_ConfigurationNode.

◆ CheckExtension()

virtual bool DE_ConfigurationNode::CheckExtension ( const TCollection_AsciiString & theExtension) const
virtual

Checks the file extension to verify a format.

Parameters
[in]theExtensioninput file extension
Returns
true if file is supported by a current provider

◆ Copy()

virtual occ::handle< DE_ConfigurationNode > DE_ConfigurationNode::Copy ( ) const
pure virtual

◆ CustomActivation()

virtual void DE_ConfigurationNode::CustomActivation ( const NCollection_List< TCollection_AsciiString > & )
inlinevirtual

Custom function to activate commercial DE component. The input is special sequence of values that described in specific component documentation. Order is important. Each component can have own way of activation.

The main goal - real-time loading plug-in activation. OpenSource components don't need to have activation process.

◆ GetExtensions()

virtual NCollection_List< TCollection_AsciiString > DE_ConfigurationNode::GetExtensions ( ) const
pure virtual

◆ GetFormat()

virtual TCollection_AsciiString DE_ConfigurationNode::GetFormat ( ) const
pure virtual

◆ GetVendor()

virtual TCollection_AsciiString DE_ConfigurationNode::GetVendor ( ) const
pure virtual

◆ IsEnabled()

bool DE_ConfigurationNode::IsEnabled ( ) const
inline

Gets the provider loading status.

Returns
true if the load is correct

◆ IsExportSupported()

virtual bool DE_ConfigurationNode::IsExportSupported ( ) const
virtual

◆ IsImportSupported()

virtual bool DE_ConfigurationNode::IsImportSupported ( ) const
virtual

◆ IsStreamSupported()

virtual bool DE_ConfigurationNode::IsStreamSupported ( ) const
virtual

Checks for stream support.

Returns
true if streams are supported

Reimplemented in DESTEP_ConfigurationNode, DESTL_ConfigurationNode, and DEVRML_ConfigurationNode.

◆ Load() [1/2]

virtual bool DE_ConfigurationNode::Load ( const occ::handle< DE_ConfigurationContext > & theResource)
pure virtual

Updates values according the resource.

Parameters
[in]theResourceinput resource to use
Returns
True if Load was successful

Implemented in DE_ShapeFixConfigurationNode, DEBREP_ConfigurationNode, DEXCAF_ConfigurationNode, DEGLTF_ConfigurationNode, DEIGES_ConfigurationNode, DEOBJ_ConfigurationNode, DEPLY_ConfigurationNode, DESTEP_ConfigurationNode, DESTL_ConfigurationNode, and DEVRML_ConfigurationNode.

◆ Load() [2/2]

virtual bool DE_ConfigurationNode::Load ( const TCollection_AsciiString & theResourcePath = "")
virtual

Updates values according the resource file.

Parameters
[in]theResourcePathfile path to resource
Returns
True if Load was successful

◆ Register()

virtual void DE_ConfigurationNode::Register ( const occ::handle< DE_Wrapper > & theWrapper) const
virtual

Registers configuration node with the specified wrapper.

Parameters
[in]theWrapperwrapper to register with

◆ Save() [1/2]

virtual TCollection_AsciiString DE_ConfigurationNode::Save ( ) const
pure virtual

◆ Save() [2/2]

bool DE_ConfigurationNode::Save ( const TCollection_AsciiString & theResourcePath) const

Writes configuration to the resource file.

Parameters
[in]theResourcePathfile path to resource
Returns
True if Save was successful

◆ SetEnabled()

void DE_ConfigurationNode::SetEnabled ( const bool theIsLoaded)
inline

Sets the provider loading status.

Parameters
[in]theIsLoadedinput load status

◆ UnRegister()

virtual void DE_ConfigurationNode::UnRegister ( const occ::handle< DE_Wrapper > & theWrapper) const
virtual

Unregisters configuration node from the specified wrapper.

Parameters
[in]theWrapperwrapper to unregister from

◆ UpdateLoad()

virtual bool DE_ConfigurationNode::UpdateLoad ( const bool theToImport,
const bool theToKeep )
virtual

Update loading status. Checking for the ability to read and write.

Parameters
[in]theToImportflag to updates for import. true-import, false-export
[in]theToKeepflag to save update result
Returns
true, if node can be used

Field Documentation

◆ GlobalParameters

struct DE_ConfigurationNode::DE_SectionGlobal DE_ConfigurationNode::GlobalParameters

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