C3D Toolkit  Kernel - 118069, Vision - 2.16.7.1844

Implementation of model document which has regular structure. More...

#include <conv_model_document.h>

+ Inheritance diagram for C3dModelDocument:
+ Collaboration diagram for C3dModelDocument:

Public Member Functions

 C3dModelDocument (SPtr< C3DPmiToItem > pmiToContent=SPtr< C3DPmiToItem >())
 Conscructor.
 
 ~C3dModelDocument () override
 Descructor.
 
bool IsAssembly () const override
 Is it an assembly?
 
bool IsEmpty () const override
 There is no data.
 
void SetContent (MbItem *) override
 Prototype of a new interface function - get the placement the model is defined in. More...
 
MbItem * GetContent () override
 Prototype of a new interface function - get the filling.
 
ModelAssemblyPtr CreateAssembly (const c3d::ItemsSPtrVector &componentItems, const c3d::string_t &fileName) override
 Create a document with a new assembly while importing. More...
 
ModelPartPtr CreatePart (const c3d::ItemsSPtrVector &componentItems, const c3d::string_t &fileName) override
 Create a document with a new part while importing. More...
 
ModelAssemblyPtr GetInstanceAssembly () override
 Get an assembly for export. More...
 
ModelPartPtr GetInstancePart () override
 Get the detail for export. More...
 
bool FinishImport (IProgressIndicator *) override
 Complete the import and save the document. More...
 
DEPRECATE_DECLARE map_of_visual_items GetAnnotationItems (eTextForm) const override
 Get elements of annotation, corresponding items of geometric model. More...
 
DEPRECATE_DECLARE void SetAnnotationItems (const map_of_visual_items &vi) override
 Set sizes.
 
DEPRECATE_DECLARE void OpenDocument () override
 Open a document.

 
SPtr< IConverterMetadataReceiver > GetMetadataReceiver () override
 Get metadata provider. More...
 
c3d::path_string GetMetadataWritePath () override
 Get metadata write path. More...
 
SPtr< C3DPmiToItem > PmiInContent () const
 If PMI is included into model item.
 
DEPRECATE_DECLARE void RegisterAnnotation (c3d::ItemSPtr component, const AnnotationSptrVector &annotation, const AnnotationSptrVector &requirements)
 Register annotation object.
 
void ResetInstanceIterators ()
 Reset instances itrerators.
 
void SetMetadataReceiver (SPtr< IConverterMetadataReceiver > const &)
 Set specific metadata provider.
 
void SetMetadataWritePath (c3d::path_string const &)
 Set the path to write metadata to, the directory must exist, be empty and writeable.
 
void InitDocumentByTwin (MbModel const &)
 Build document by twin.
 
bool MakeAssembliesUnique ()
 Convert all assemblies and instances to unique ones.
 
- Public Member Functions inherited from MbRefItem
virtual MbeRefType RefType () const
 Registration type (for copying, duplication).
 
void AddRegistrator (MbRegDuplicate *reg) const
 Add the register.
 
void RemoveRegistrator (MbRegDuplicate *reg) const
 Remove the register.
 
refcount_t GetUseCount () const
 Get count of references (get count of owners of an object).
 
refcount_t AddRef () const
 Increase count of references by one.
 
refcount_t DecRef () const
 Decrease count of references by one.
 
refcount_t Release () const
 Decrease count of references by one and if count of references became zero, then remove itself.
 

Additional Inherited Members

- Protected Member Functions inherited from MbRefItem
 MbRefItem ()
 Constructor without parameters.
 

Detailed Description

Implementation of model document which has regular structure.

Member Function Documentation

◆ SetContent()

void C3dModelDocument::SetContent ( MbItem *  )
overridevirtual

Prototype of a new interface function - get the placement the model is defined in.

Prototype of a new interface function - set a model to fill.

Implements ItModelDocument.

◆ CreateAssembly()

ModelAssemblyPtr C3dModelDocument::CreateAssembly ( const c3d::ItemsSPtrVector &  componentItems,
const c3d::string_t &  fileName 
)
overridevirtual

Create a document with a new assembly while importing.

Increase the reference counter of the resultant document by 1.

Parameters
[in]componentItems- Items to add into the assembly.
[in]fileName- Assembly name.
Returns
Instance of an assembly if the operation succeeded, nullptr - otherwise.

Implements ItModelDocument.

◆ CreatePart()

ModelPartPtr C3dModelDocument::CreatePart ( const c3d::ItemsSPtrVector &  componentItems,
const c3d::string_t &  fileName 
)
overridevirtual

Create a document with a new part while importing.

Increase the reference counter of the resultant document by 1.

Parameters
[in]componentItems- Items to add into the assembly.
[in]fileName- A part name.
Returns
Instance of the part if the operation succeeded, nullptr - otherwise.

Implements ItModelDocument.

◆ GetInstanceAssembly()

ModelAssemblyPtr C3dModelDocument::GetInstanceAssembly ( )
overridevirtual

Get an assembly for export.

Increase the reference counter of the resultant assembly by 1.

Returns
Instance of an assembly if the operation succeeded, nullptr - otherwise.

Implements ItModelDocument.

◆ GetInstancePart()

ModelPartPtr C3dModelDocument::GetInstancePart ( )
overridevirtual

Get the detail for export.

Increase the reference counter of the resultant part by 1.

Returns
Instance of the part if the operation succeeded, nullptr - otherwise.

Implements ItModelDocument.

◆ FinishImport()

bool C3dModelDocument::FinishImport ( IProgressIndicator *  indicator)
overridevirtual

Complete the import and save the document.

Returns
true if the operation succeeded, false - otherwise.
Parameters
[in]indicatorAn object indicating a process progress.

Implements ItModelDocument.

◆ GetAnnotationItems()

DEPRECATE_DECLARE map_of_visual_items C3dModelDocument::GetAnnotationItems ( eTextForm  ) const
overridevirtual

Get elements of annotation, corresponding items of geometric model.

Parameters
[in]eTextForm- Text representation form.
Returns
Vector of annotation objects.

Implements ItModelDocument.

◆ GetMetadataReceiver()

SPtr<IConverterMetadataReceiver> C3dModelDocument::GetMetadataReceiver ( )
overridevirtual

Get metadata provider.

Metadata are used in cases they don't fin in neigher geometric nor attribute-based models.

Returns
Implementation of metadata processor.

Reimplemented from ItModelDocument.

◆ GetMetadataWritePath()

c3d::path_string C3dModelDocument::GetMetadataWritePath ( )
overridevirtual

Get metadata write path.

Metadata are used in cases they don't fit in neigher geometric nor attribute-based models. This method is alternative for GetMetadataReceiver() for cases when it is more preferred for user application to store metadata into the filesystem rather than transferring them via IConverterMetadataReceiver. The directory must exist, be empty and writable.

Returns
Path for writing metadata into the filesystem.

Reimplemented from ItModelDocument.


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