CFx SDK Documentation  2022 SP0
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 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 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, OdResult *result=NULL) const
 
- 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 Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Protected Member Functions

OdGUID getTopicId (const OdBcfTopicFolderPtr &pTopicFolder, OdResult *result=NULL) const
 
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
 

Detailed Description

A class that provides functionality for working with topic folder.

Definition at line 107 of file BcfSession.h.

Member Typedef Documentation

◆ ComponentColoring

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

Definition at line 316 of file BcfSession.h.

◆ ComponentColoringArray

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

Definition at line 321 of file BcfSession.h.

Member Enumeration Documentation

◆ eSortParameter

Enumerator
kSortParameter_Guid 
kSortParameter_CreationDate 
kSortParameter_ModifiedDate 
kSortParameter_Index 

Definition at line 186 of file BcfSession.h.

Member Function Documentation

◆ addArchive()

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

Adds existing archive object to session collection.

Parameters
pArchive[in] A pointer to archive object.
result[out] A pointer to variable containing result of operation.
Returns
Returns a string containing project Id of archive.

◆ addScreenshot()

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

Adds screenshot to specified topic.

Parameters
projectId[in] A string containing project Id.
topicId[in] An GUID of topic folder.
fileName[in] A string containing file name to use for saving.
data[in] A pointer to buffer containing file data.
size[in] Length of the buffer containing file data.
result[out] A pointer to variable containing result of operation.

◆ addTopicFolder()

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

Adds existing topic folder object to specified project.

Parameters
projectId[in] A string containing project Id.
pMarkup[in] A pointer to topic folder object.
result[out] A pointer to variable containing result of operation.
Returns
Returns a GUID of added topic folder.

◆ 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
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
Returns a smart pointer to the created <link OdBcf::OdBcfComponentColoring, 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 containing GUIDs for instance initialization.
result[out] A pointer to variable containing result of operation.
Returns
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 containing GUIDs for instance initialization.
optional[in] A flag that determines whether the components is visible by default (equal to true) or hidden (equal to false).
result[out] A pointer to variable containing result of operation.
Returns
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 containing user name to sign BCF data.
authoringToolId[in] A string containing application name to sign BCF data.
pDataAccessor[in] A pointer to data accessor to use as default.
Returns
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 pointer to a variable containing initial values for instance initialization.
result[out] A pointer to variable containing result of operation.
Returns
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 pointer to a variable containing initial values for instance initialization.
result[out] A pointer to variable containing result of operation.
Returns
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 pointer to a variable containing initial values for instance initialization.
result[out] A pointer to variable containing result of operation.
Returns
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 pointer to variable containing result of operation.
Returns
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 pointer to variable containing result of operation.
Returns
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,
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
Returns a smart pointer to the created <link OdBcf::OdBcfVisualizationInfo, OdBcfVisualizationInfo> instance.

◆ getArchive()

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

Retrieves archive with specified Id.

Parameters
projectId[in] A string containing project Id.
result[out] A pointer to variable containing result of operation.
Returns
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 
)

Constrcuts path to screenshot of specified topic.

Parameters
projectId[in] A string containing project Id.
topicId[in] An GUID of topic folder.
fileName[in] A string containing file name of the screenshot.s
result[out] A pointer to variable containing result of operation.
Returns
Returns a string containing path to the screenshot.
Remarks
If no fileName is provided default screenshot name will be used.

◆ getTopicFolder()

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

Retrieves topic folder of specified project by GUID.

Parameters
projectId[in] A string containing project Id.
topicId[in] An GUID of topic folder.
result[out] A pointer to variable containing result of operation.
Returns
Returns a smart pointer to the topic folder.

◆ getTopicId()

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

◆ getTopics()

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

Retrieves topic folders of specified project.

Parameters
projectId[in] A string containing project Id.
sortParameter[in] A parameter to sort topic folders before forwarding.
result[out] A pointer to variable containing result of operation.
Returns
Returns an arrray of smart pointers to topic folder objects.

◆ loadProject()

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

Loads archive using data accessor.

Parameters
fileName[in] A string containing file name to load.
pDataAccessor[in] A pointer to data accessor to use for loading.
result[out] A pointer to variable containing result of operation.
Returns
Returns a string containing project Id.

◆ ODRX_DECLARE_MEMBERS()

OdBcf::OdBcfSession::ODRX_DECLARE_MEMBERS ( OdBcfSession  )

◆ removeArchive()

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

Removes archive with specified Id.

Parameters
projectId[in] A string containing project Id.
result[out] A pointer to variable containing result of operation.
Returns
Returns a smart pointer to the removed archive.

◆ removeTopicFolder()

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

Retrieves topic folder of specified project by GUID.

Parameters
projectId[in] A string containing project Id.
topicId[in] An GUID of topic folder.
result[out] A pointer to variable containing result of operation.
Returns
Returns a smart pointer to the topic folder.

◆ saveProject()

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

Saves archive using data accessor.

Parameters
projectId[in] A string containing project Id.
fileName[in] A string containing file name to use for saving.
pDataAccessor[in] A pointer to data accessor to use for saving.
result[out] A pointer to variable containing result of operation.

◆ validateArchive()

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

Validates archive with specified Id.

Parameters
projectId[in] A string containing project Id.
result[out] A pointer to variable containing result of operation.
Returns
Returns true if 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 360 of file BcfSession.h.

◆ m_author

OdString OdBcf::OdBcfSession::m_author
protected

Definition at line 357 of file BcfSession.h.

◆ m_authoringToolId

OdString OdBcf::OdBcfSession::m_authoringToolId
protected

Definition at line 358 of file BcfSession.h.

◆ m_pDataAccessor

OdBcfDataAccessorPtr OdBcf::OdBcfSession::m_pDataAccessor
protected

Definition at line 359 of file BcfSession.h.


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