CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OdBcf::OdBcfSession Class Reference

#include <BcfSession.h>

Inheritance diagram for OdBcf::OdBcfSession:
OdRxObject

Public Types

enum  eSortParameter { kSortParameter_Guid = 0 , kSortParameter_CreationDate , kSortParameter_ModifiedDate , kSortParameter_Index }
 
typedef std::pair< OdArray< OdString >, OdStringComponentColoring
 
typedef OdArray< ComponentColoringComponentColoringArray
 

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdBcfSession)
 
void setAuthor (const OdString &author)
 
OdResult setProgressMeter (OdDbHostAppProgressMeter *pMeter)
 
void saveProject (const OdString &projectId, const OdString &fileName=OdString(), OdBcfDataAccessorPtr pDataAccessor=OdBcfDataAccessorPtr(), OdResult *result=NULL)
 
OdString loadProject (const OdString &fileName, OdBcfDataAccessorPtr pDataAccessor=OdBcfDataAccessorPtr(), OdResult *result=NULL)
 
OdString addArchive (const OdBcfArchivePtr &pArchive, OdResult *result=NULL)
 
OdBcfArchivePtr getArchive (const OdString &projectId, OdResult *result=NULL)
 
bool validateArchive (const OdString &projectId, OdResult *result=NULL) const
 
OdBcfArchivePtr removeArchive (const OdString &projectId, OdResult *result=NULL)
 
OdBcfTopicFolderArray getTopics (const OdString &projectId, eSortParameter sortParameter=kSortParameter_Guid, OdResult *result=NULL)
 
OdGUID addTopicFolder (const OdString &projectId, const OdBcfTopicFolderPtr &pTopicFolder, OdResult *result=NULL)
 
OdBcfTopicFolderPtr getTopicFolder (const OdString &projectId, const OdGUID &topicId, OdResult *result=NULL)
 
void removeTopicFolder (const OdString &projectId, const OdGUID &topicId, OdResult *result=NULL)
 
void addComment (const OdString &projectId, const OdGUID &topicId, const OdString &comment, OdResult *result=NULL)
 
void editComment (const OdString &projectId, const OdGUID &topicId, const OdGUID &commentId, const OdString &comment, OdResult *result=NULL)
 
void deleteComment (const OdString &projectId, const OdGUID &topicId, const OdGUID &commentId, OdResult *result=NULL)
 
void addScreenshot (const OdString &projectId, const OdGUID &topicId, const OdString &fileName, const char *data, unsigned int size, OdResult *result=NULL)
 
OdString getScreenshot (const OdString &projectId, const OdGUID &topicId, const OdString &fileName=OdString(), OdResult *result=NULL)
 
OdBcfProjectPtr createProject (const OdBcfProjectData *pProjectData, OdResult *result=NULL) const
 
OdBcfProjectExtensionPtr createProjectExtension (const OdBcfProjectExtensionData *pProjectExtensionData, OdResult *result=NULL) const
 
OdBcfVersionPtr createVersion (OdResult *result=NULL) const
 
OdBcfTopicPtr createTopic (const OdBcfTopicData *pTopicData, OdResult *result=NULL) const
 
OdBcfViewSetupHintsPtr createViewSetupHints (OdResult *result=NULL) const
 
OdBcfComponentSelectionPtr createComponentSelection (const OdArray< OdString > &ifcGuids, OdResult *result=NULL) const
 
OdBcfComponentVisibilityPtr createComponentVisibility (const OdArray< OdString > &ifcGuids, bool defaultVisibility=false, OdResult *result=NULL) const
 
OdBcfComponentColoringPtr createComponentColoring (const ComponentColoringArray &componentColoring, OdResult *result=NULL) const
 
OdBcfBitmapPtr createBitmap (const OdBcfBitmapData *pBitmapData, OdResult *result=NULL) const
 
OdBcfVisualizationInfoPtr createVisualizationInfo (const OdBcfVisualizationInfoData *pVisualizationInfoData, const OdString &visInfoFileName, const OdString &screenshotFileName, OdBcfMarkupPtr pMarkup, OdInt32 viewPointIndex=OdBcf::Utils::getUnset< OdInt32 >(), OdResult *result=NULL) const
 
void deleteViewpoint (const OdString &projectId, const OdGUID &topicId, const OdGUID &viewpointId, OdResult *result=NULL)
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static OdSmartPtr< OdBcfSessioncreateObject (const OdString &author, const OdString &authoringToolId, const OdBcfDataAccessorPtr &pDataAccessor=OdBcfDataAccessorPtr())
 
static OdGUID getTopicId (const OdBcfTopicFolderPtr &pTopicFolder, OdResult *result=NULL)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Protected Member Functions

const OdBcfComponentPtr createComponent (const OdString &ifcGuid) const
 
OdBcfComponentArray createComponents (const OdArray< OdString > &ifcGuids) const
 
OdBcfColorPtr createColor (const OdArray< OdString > &ifcGuids, const OdString &color) const
 

Protected Attributes

OdString m_author
 
OdString m_authoringToolId
 
OdBcfDataAccessorPtr m_pDataAccessor
 
OdBcfArchiveMap m_archives
 
OdDbHostAppProgressMeterm_pMeter
 

Detailed Description

A class that provides functionality for managing a session for work with BCF data.

Definition at line 124 of file BcfSession.h.

Member Typedef Documentation

◆ ComponentColoring

A data type that represents an STD pair containing an array of strings with component GUIDs and a string that represents a color value.

Definition at line 398 of file BcfSession.h.

◆ ComponentColoringArray

A data type that represents an ODA array of <link OdBcf::OdBcfSession::ComponentColoring, ComponentColoring> objects.

Definition at line 403 of file BcfSession.h.

Member Enumeration Documentation

◆ eSortParameter

Enumerates supported sort orders within the session.

Enumerator
kSortParameter_Guid 

Sorting by the global unique identifier (GUID).

kSortParameter_CreationDate 

Sorting by the date of creation.

kSortParameter_ModifiedDate 

Sorting by the date of the last modification.

kSortParameter_Index 

Sorting by the index.

Definition at line 219 of file BcfSession.h.

Member Function Documentation

◆ addArchive()

OdString OdBcf::OdBcfSession::addArchive ( const OdBcfArchivePtr pArchive,
OdResult result = NULL 
)

Adds an existing archive object to the session collection.

Parameters
pArchive[in] A smart pointer to the archive object.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A string that contains the project identifier of the archive object.

◆ addComment()

void OdBcf::OdBcfSession::addComment ( const OdString projectId,
const OdGUID topicId,
const OdString comment,
OdResult result = NULL 
)

Adds comment to a topic with a specified GUID from a specified project.

Parameters
projectId[in] A string that contains the project identifier.
topicId[in] A GUID of the topic folder object.
comment[in] A string that contains comment text.
result[out] A raw pointer to a value that contains the result of the operation.
Remarks
If you want to get the result of adding the comment, pass a valid pointer to the <exref target="https://docs.opendesign.com/tkernel/OdResult.html">OdResult</exref> value to the method and analyze it after the method call ends.

◆ addScreenshot()

void OdBcf::OdBcfSession::addScreenshot ( const OdString projectId,
const OdGUID topicId,
const OdString fileName,
const char *  data,
unsigned int  size,
OdResult result = NULL 
)

Adds a screenshot to a specified topic folder object.

Parameters
projectId[in] A string that contains the project identifier.
topicId[in] A GUID of the topic folder object.
fileName[in] A string that contains the file name to use for the saving operation.
data[in] A pointer to a data buffer that contains the file data.
size[in] A length of the data buffer that contains the file data.
result[out] A raw pointer to a value that contains the result of the operation.

◆ addTopicFolder()

OdGUID OdBcf::OdBcfSession::addTopicFolder ( const OdString projectId,
const OdBcfTopicFolderPtr pTopicFolder,
OdResult result = NULL 
)

Adds an existing topic folder object to a specified project.

Parameters
projectId[in] A string that contains the project identifier.
pTopicFolder[in] A smart pointer to the topic folder object.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A GUID of the added topic folder object.

◆ createBitmap()

OdBcfBitmapPtr OdBcf::OdBcfSession::createBitmap ( const OdBcfBitmapData pBitmapData,
OdResult result = NULL 
) const

Creates a new bitmap instance.

Parameters
pBitmapData[in] A pointer to a variable containing initial values for instance initialization.
result[out] A pointer to variable containing result of operation.
Returns
A smart pointer to the created <link OdBcf::OdBcfBitmap, OdBcfBitmap> instance.

◆ createColor()

OdBcfColorPtr OdBcf::OdBcfSession::createColor ( const OdArray< OdString > &  ifcGuids,
const OdString color 
) const
protected

◆ createComponent()

const OdBcfComponentPtr OdBcf::OdBcfSession::createComponent ( const OdString ifcGuid) const
protected

◆ createComponentColoring()

OdBcfComponentColoringPtr OdBcf::OdBcfSession::createComponentColoring ( const ComponentColoringArray componentColoring,
OdResult result = NULL 
) const

Creates a new component coloring instance.

Parameters
componentColoring[in] An array of ComponentColoring objects for instance initialization.
result[out] A pointer to variable containing result of operation.
Returns
A smart pointer to the created <link OdBcf::OdBcfSession::ComponentColoring, OdBcfComponentColoring> instance.

◆ createComponents()

OdBcfComponentArray OdBcf::OdBcfSession::createComponents ( const OdArray< OdString > &  ifcGuids) const
protected

◆ createComponentSelection()

OdBcfComponentSelectionPtr OdBcf::OdBcfSession::createComponentSelection ( const OdArray< OdString > &  ifcGuids,
OdResult result = NULL 
) const

Creates a new component selection instance.

Parameters
ifcGuids[in] An array of strings that contains GUIDs for the instance initialization.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A smart pointer to the created <link OdBcf::OdBcfComponentSelection, OdBcfComponentSelection> instance.

◆ createComponentVisibility()

OdBcfComponentVisibilityPtr OdBcf::OdBcfSession::createComponentVisibility ( const OdArray< OdString > &  ifcGuids,
bool  defaultVisibility = false,
OdResult result = NULL 
) const

Creates a new component visibility instance.

Parameters
ifcGuids[in] An array of strings that contains GUIDs for the instance initialization.
defaultVisibility[in] A flag that determines whether the components are visible by default (if it is equal to true) or hidden (if it is equal to false).
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A smart pointer to the created <link OdBcf::OdBcfComponentVisibility, OdBcfComponentVisibility> instance.

◆ createObject()

static OdSmartPtr< OdBcfSession > OdBcf::OdBcfSession::createObject ( const OdString author,
const OdString authoringToolId,
const OdBcfDataAccessorPtr pDataAccessor = OdBcfDataAccessorPtr() 
)
static

Creates a new session object.

Parameters
author[in] A string that contains the session author.
authoringToolId[in] A string that contains the identifier of the authoring application used by the author.
pDataAccessor[in] A smart pointer to a data accessor object.
Returns
A smart pointer to the created <link OdBcf::OdBcfSession, OdBcfSession> instance.

◆ createProject()

OdBcfProjectPtr OdBcf::OdBcfSession::createProject ( const OdBcfProjectData pProjectData,
OdResult result = NULL 
) const

Creates a new project instance.

Parameters
pProjectData[in] A aw pointer to an object that contains values for the instance initialization.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A smart pointer to the created <link OdBcf::OdBcfProject, OdBcfProject> instance.

◆ createProjectExtension()

OdBcfProjectExtensionPtr OdBcf::OdBcfSession::createProjectExtension ( const OdBcfProjectExtensionData pProjectExtensionData,
OdResult result = NULL 
) const

Creates a new project extension instance.

Parameters
pProjectExtensionData[in] A raw pointer to an object that contains values for the instance initialization.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A smart pointer to the created <link OdBcf::OdBcfProjectExtension, OdBcfProjectExtension> instance.

◆ createTopic()

OdBcfTopicPtr OdBcf::OdBcfSession::createTopic ( const OdBcfTopicData pTopicData,
OdResult result = NULL 
) const

Creates a new topic instance.

Parameters
pTopicData[in] A raw pointer to an object that contains values for the instance initialization.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A smart pointer to the created <link OdBcf::OdBcfTopic, OdBcfTopic> instance.

◆ createVersion()

OdBcfVersionPtr OdBcf::OdBcfSession::createVersion ( OdResult result = NULL) const

Creates a new version instance.

Parameters
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A smart pointer to the created <link OdBcf::OdBcfVersion, OdBcfVersion> instance.

◆ createViewSetupHints()

OdBcfViewSetupHintsPtr OdBcf::OdBcfSession::createViewSetupHints ( OdResult result = NULL) const

Creates a new view setup hints instance.

Parameters
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A smart pointer to the created <link OdBcf::OdBcfProject, OdBcfProject> instance.

◆ createVisualizationInfo()

OdBcfVisualizationInfoPtr OdBcf::OdBcfSession::createVisualizationInfo ( const OdBcfVisualizationInfoData pVisualizationInfoData,
const OdString visInfoFileName,
const OdString screenshotFileName,
OdBcfMarkupPtr  pMarkup,
OdInt32  viewPointIndex = OdBcf::Utils::getUnsetOdInt32 >(),
OdResult result = NULL 
) const

Creates a new visualization info instance.

Parameters
pVisualizationInfoData[in] A pointer to a variable containing initial values for instance initialization.
visInfoFileName[in] A string containing visualization information file name.
screenshotFileName[in] A string containing screenshot file name.
pMarkup[out] A pointer to a existing markup data for visualization information initialization.
result[out] A pointer to variable containing result of operation.
Returns
A smart pointer to the created <link OdBcf::OdBcfVisualizationInfo, OdBcfVisualizationInfo> instance.

◆ deleteComment()

void OdBcf::OdBcfSession::deleteComment ( const OdString projectId,
const OdGUID topicId,
const OdGUID commentId,
OdResult result = NULL 
)

Delete the comment from the topic with a specified GUID from a specified project.

Parameters
projectId[in] A string that contains the project identifier.
topicId[in] A GUID of the topic folder object.
commentId[in] A GUID of the comment.
result[out] A raw pointer to a value that contains the result of the operation.
Remarks
If you want to get the result of the comment deletion, pass a valid pointer to the <exref target="https://docs.opendesign.com/tkernel/OdResult.html">OdResult</exref> value to the method and analyze it after the method call ends.

◆ deleteViewpoint()

void OdBcf::OdBcfSession::deleteViewpoint ( const OdString projectId,
const OdGUID topicId,
const OdGUID viewpointId,
OdResult result = NULL 
)

Delete the viewpoint from the topic with a specified GUID from a specified project.

Parameters
projectId[in] A string that contains the project identifier.
topicId[in] A GUID of the topic folder object.
viewpointId[in] A GUID of the viewpoint.
result[out] A raw pointer to a value that contains the result of the operation.
Remarks
If you want to get the result of the viewpoint deletion, pass a valid pointer to the <exref target="https://docs.opendesign.com/tkernel/OdResult.html">OdResult</exref> value to the method and analyze it after the method call ends.

◆ editComment()

void OdBcf::OdBcfSession::editComment ( const OdString projectId,
const OdGUID topicId,
const OdGUID commentId,
const OdString comment,
OdResult result = NULL 
)

Edit the comment from the topic with a specified GUID from a specified project.

Parameters
projectId[in] A string that contains the project identifier.
topicId[in] A GUID of the topic folder object.
commentId[in] A GUID of the comment.
comment[in] A string that contains the new comment text.
result[out] A raw pointer to a value that contains the result of the operation.
Remarks
If you want to get the result of editing the comment, pass a valid pointer to the <exref target="https://docs.opendesign.com/tkernel/OdResult.html">OdResult</exref> value to the method and analyze it after the method call ends.

◆ getArchive()

OdBcfArchivePtr OdBcf::OdBcfSession::getArchive ( const OdString projectId,
OdResult result = NULL 
)

Retrieves an archive with the specified identifier.

Parameters
projectId[in] A string that contains the project identifier.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A smart pointer to the archive.

◆ getScreenshot()

OdString OdBcf::OdBcfSession::getScreenshot ( const OdString projectId,
const OdGUID topicId,
const OdString fileName = OdString(),
OdResult result = NULL 
)

Constructs the path to the screenshot of a specified topic.

Parameters
projectId[in] A string containing project Id.
topicId[in] A GUID of the topic folder.
fileName[in] A string that contains the full file name of the screenshot.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A string that contains the path to the screenshot.
Remarks
If the file name of the screenshot is not provided (an empty string is passed) the method uses the default screenshot name.

◆ getTopicFolder()

OdBcfTopicFolderPtr OdBcf::OdBcfSession::getTopicFolder ( const OdString projectId,
const OdGUID topicId,
OdResult result = NULL 
)

Retrieves the topic folder object with a specified GUID from a specified project.

Parameters
projectId[in] A string that contains the project identifier.
topicId[in] A GUID of the topic folder object.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A smart pointer to the topic folder object.

◆ getTopicId()

static OdGUID OdBcf::OdBcfSession::getTopicId ( const OdBcfTopicFolderPtr pTopicFolder,
OdResult result = NULL 
)
static

Returns an OdGUID of topic folder.

Parameters
pTopicFolder[in] A smart pointer to the topic folder object.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A GUID of the topic folder object.

◆ getTopics()

OdBcfTopicFolderArray OdBcf::OdBcfSession::getTopics ( const OdString projectId,
eSortParameter  sortParameter = kSortParameter_Guid,
OdResult result = NULL 
)

Retrieves the topic folders of a specified project.

Parameters
projectId[in] A string that contains the project identifier.
sortParameter[in] A sort type for the output topic folders list.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
An array of smart pointers to topic folder objects.

◆ loadProject()

OdString OdBcf::OdBcfSession::loadProject ( const OdString fileName,
OdBcfDataAccessorPtr  pDataAccessor = OdBcfDataAccessorPtr(),
OdResult result = NULL 
)

Loads an archive using a specified data accessor.

Parameters
fileName[in] A string that contains the full file name to load.
pDataAccessor[in] A smart pointer to the data accessor to use for loading.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A string that contains the identifier of the loaded project.

◆ ODRX_DECLARE_MEMBERS()

OdBcf::OdBcfSession::ODRX_DECLARE_MEMBERS ( OdBcfSession  )

◆ removeArchive()

OdBcfArchivePtr OdBcf::OdBcfSession::removeArchive ( const OdString projectId,
OdResult result = NULL 
)

Removes the archive with a specified identifier.

Parameters
projectId[in] A string that contains the project identifier.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
A smart pointer to the removed archive.

◆ removeTopicFolder()

void OdBcf::OdBcfSession::removeTopicFolder ( const OdString projectId,
const OdGUID topicId,
OdResult result = NULL 
)

Removes a topic folder object with a specified GUID from a specified project.

Parameters
projectId[in] A string that contains the project identifier.
topicId[in] A GUID of the topic folder object.
result[out] A raw pointer to a value that contains the result of the operation.

◆ saveProject()

void OdBcf::OdBcfSession::saveProject ( const OdString projectId,
const OdString fileName = OdString(),
OdBcfDataAccessorPtr  pDataAccessor = OdBcfDataAccessorPtr(),
OdResult result = NULL 
)

Saves the archive using a specified data accessor object.

Parameters
projectId[in] A string that contains the project Id.
fileName[in] A string that contains the file name to use for the saving.
pDataAccessor[in] A smart pointer to the data accessor object that should be used for the saving.
result[out] A raw pointer to a value that contains the result of the operation.

◆ setAuthor()

void OdBcf::OdBcfSession::setAuthor ( const OdString author)

Sets a new session author.

Parameters
author[in] A string that contains the session author.

◆ setProgressMeter()

OdResult OdBcf::OdBcfSession::setProgressMeter ( OdDbHostAppProgressMeter pMeter)

Sets a progress meter.

Parameters
pMeter[in] A pointer to progress meter.
Returns
eOk if the progress meter was successfully set; otherwise, the method returns an appropriate error code.

◆ validateArchive()

bool OdBcf::OdBcfSession::validateArchive ( const OdString projectId,
OdResult result = NULL 
) const

Validates the archive with a specified identifier.

Parameters
projectId[in] A string that contains the project Id.
result[out] A raw pointer to a value that contains the result of the operation.
Returns
true if the specified archive contains all required data; otherwise the method returns false.

Member Data Documentation

◆ m_archives

OdBcfArchiveMap OdBcf::OdBcfSession::m_archives
protected

Definition at line 455 of file BcfSession.h.

◆ m_author

OdString OdBcf::OdBcfSession::m_author
protected

Definition at line 452 of file BcfSession.h.

◆ m_authoringToolId

OdString OdBcf::OdBcfSession::m_authoringToolId
protected

Definition at line 453 of file BcfSession.h.

◆ m_pDataAccessor

OdBcfDataAccessorPtr OdBcf::OdBcfSession::m_pDataAccessor
protected

Definition at line 454 of file BcfSession.h.

◆ m_pMeter

OdDbHostAppProgressMeter* OdBcf::OdBcfSession::m_pMeter
protected

Definition at line 456 of file BcfSession.h.


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