CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
BcfSession.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24#ifndef _BFC_SESSION_H
25#define _BFC_SESSION_H
26
27#include "BcfCommon.h"
28#include "OdGUID.h"
29#include "OdArray.h"
30#define STL_USING_MAP
31#define STL_USING_UTILITY
32#include "OdaSTL.h"
33
35
39namespace OdBcf {
40
41 class OdBcfProjectExtensionData;
42 class OdBcfProjectExtension;
44
45 class OdBcfProjectData;
46 class OdBcfProject;
48
49 class OdBcfVersion;
51
52 class OdBcfTopicData;
53 class OdBcfTopic;
55
56 class OdBcfMarkup;
58
59 class OdBcfViewPoint;
61
66
67 class OdBcfComponent;
69
74
75 class OdBcfViewSetupHints;
77
78 class OdBcfComponentSelection;
80
81 class OdBcfComponentVisibility;
83
84 class OdBcfColor;
86
87 class OdBcfComponentColoring;
89
90 class OdBcfComponents;
92
93 class OdBcfBitmapData;
94 class OdBcfBitmap;
96
97 class OdBcfVisualizationInfoData;
98 class OdBcfVisualizationInfo;
100
105
106 class OdBcfTopicFolder;
108
113
114 class OdBcfArchive;
116 typedef std::map<OdString, OdBcfArchivePtr> OdBcfArchiveMap;
117
118 class OdBcfDataAccessor;
120
125 {
126 public:
127
128 //DOM-IGNORE-BEGIN
130 //DOM-IGNORE-END
131
140 const OdString &author,
141 const OdString &authoringToolId,
142 const OdBcfDataAccessorPtr &pDataAccessor = OdBcfDataAccessorPtr());
143
144 //const OdBcfArchiveMap& loadProjects(OdResult *result = NULL);
145
150 void setAuthor(const OdString& author);
151
158
167 const OdString &projectId,
168 const OdString &fileName = OdString(),
170 OdResult *result = NULL);
171
180 const OdString &fileName,
182 OdResult *result = NULL);
183
190 OdString addArchive(const OdBcfArchivePtr &pArchive, OdResult *result = NULL);
191
198 OdBcfArchivePtr getArchive(const OdString &projectId, OdResult *result = NULL);
199
206 bool validateArchive(const OdString &projectId, OdResult *result = NULL) const;
207
214 OdBcfArchivePtr removeArchive(const OdString &projectId, OdResult *result = NULL);
215
220 {
222 kSortParameter_Guid = 0,
228 kSortParameter_Index
229 };
230
238 OdBcfTopicFolderArray getTopics(const OdString &projectId, eSortParameter sortParameter = kSortParameter_Guid, OdResult *result = NULL);
239
247 OdGUID addTopicFolder(const OdString &projectId, const OdBcfTopicFolderPtr& pTopicFolder, OdResult *result = NULL);
248
255 static OdGUID getTopicId(const OdBcfTopicFolderPtr& pTopicFolder, OdResult* result = NULL);
256
264 OdBcfTopicFolderPtr getTopicFolder(const OdString &projectId, const OdGUID &topicId, OdResult *result = NULL);
265
272 void removeTopicFolder(const OdString &projectId, const OdGUID &topicId, OdResult *result = NULL);
273
284 void addComment(const OdString& projectId, const OdGUID& topicId, const OdString& comment, OdResult* result = NULL);
285
297 void editComment(const OdString& projectId, const OdGUID& topicId, const OdGUID& commentId, const OdString& comment, OdResult* result = NULL);
298
309 void deleteComment(const OdString& projectId, const OdGUID& topicId, const OdGUID& commentId, OdResult* result = NULL);
310
321 const OdString &projectId,
322 const OdGUID &topicId,
323 const OdString &fileName,
324 const char *data,
325 unsigned int size,
326 OdResult *result = NULL);
327
338 OdString getScreenshot(const OdString &projectId, const OdGUID &topicId, const OdString &fileName = OdString(), OdResult *result = NULL);
339
346 OdBcfProjectPtr createProject(const OdBcfProjectData *pProjectData, OdResult *result = NULL) const;
347
354 OdBcfProjectExtensionPtr createProjectExtension(const OdBcfProjectExtensionData *pProjectExtensionData, OdResult *result = NULL) const;
355
362
369 OdBcfTopicPtr createTopic(const OdBcfTopicData *pTopicData, OdResult *result = NULL) const;
370
377
385
393 OdBcfComponentVisibilityPtr createComponentVisibility(const OdArray<OdString> &ifcGuids, bool defaultVisibility = false, OdResult *result = NULL) const;
394
398 typedef std::pair<OdArray<OdString>, OdString> ComponentColoring;
399
404
412
419 OdBcfBitmapPtr createBitmap(const OdBcfBitmapData *pBitmapData, OdResult *result = NULL) const;
420
431 const OdBcfVisualizationInfoData *pVisualizationInfoData,
432 const OdString &visInfoFileName,
433 const OdString &screenshotFileName,
434 OdBcfMarkupPtr pMarkup,
435 OdInt32 viewPointIndex = OdBcf::Utils::getUnset<OdInt32>(),
436 OdResult *result = NULL) const;
437
448 void deleteViewpoint(const OdString& projectId, const OdGUID& topicId, const OdGUID& viewpointId, OdResult* result = NULL);
449
450 //DOM-IGNORE-BEGIN
451 protected:
457
458 const OdBcfComponentPtr createComponent(const OdString &ifcGuid) const;
460 OdBcfColorPtr createColor(const OdArray<OdString> &ifcGuids, const OdString &color) const;
461
462 //DOM-IGNORE-END
463 };
464
469
470} //namespace OdBcf
471
472#endif // _BFC_SESSION_H
#define BCF_EXPORT
int OdInt32
OdResult
Definition: OdResult.h:29
OdBcfVersionPtr createVersion(OdResult *result=NULL) const
bool validateArchive(const OdString &projectId, OdResult *result=NULL) const
const OdBcfComponentPtr createComponent(const OdString &ifcGuid) const
OdBcfViewSetupHintsPtr createViewSetupHints(OdResult *result=NULL) const
static OdGUID getTopicId(const OdBcfTopicFolderPtr &pTopicFolder, OdResult *result=NULL)
OdString loadProject(const OdString &fileName, OdBcfDataAccessorPtr pDataAccessor=OdBcfDataAccessorPtr(), OdResult *result=NULL)
OdBcfComponentColoringPtr createComponentColoring(const ComponentColoringArray &componentColoring, OdResult *result=NULL) const
OdResult setProgressMeter(OdDbHostAppProgressMeter *pMeter)
OdGUID addTopicFolder(const OdString &projectId, const OdBcfTopicFolderPtr &pTopicFolder, OdResult *result=NULL)
OdArray< ComponentColoring > ComponentColoringArray
Definition: BcfSession.h:403
OdBcfBitmapPtr createBitmap(const OdBcfBitmapData *pBitmapData, OdResult *result=NULL) const
OdBcfComponentSelectionPtr createComponentSelection(const OdArray< OdString > &ifcGuids, OdResult *result=NULL) const
OdBcfArchiveMap m_archives
Definition: BcfSession.h:455
OdBcfComponentVisibilityPtr createComponentVisibility(const OdArray< OdString > &ifcGuids, bool defaultVisibility=false, OdResult *result=NULL) const
void setAuthor(const OdString &author)
void addScreenshot(const OdString &projectId, const OdGUID &topicId, const OdString &fileName, const char *data, unsigned int size, OdResult *result=NULL)
ODRX_DECLARE_MEMBERS(OdBcfSession)
void deleteViewpoint(const OdString &projectId, const OdGUID &topicId, const OdGUID &viewpointId, OdResult *result=NULL)
OdString m_authoringToolId
Definition: BcfSession.h:453
OdBcfProjectPtr createProject(const OdBcfProjectData *pProjectData, OdResult *result=NULL) const
OdString addArchive(const OdBcfArchivePtr &pArchive, OdResult *result=NULL)
OdBcfComponentArray createComponents(const OdArray< OdString > &ifcGuids) const
OdBcfTopicPtr createTopic(const OdBcfTopicData *pTopicData, OdResult *result=NULL) const
OdBcfTopicFolderArray getTopics(const OdString &projectId, eSortParameter sortParameter=kSortParameter_Guid, OdResult *result=NULL)
OdBcfArchivePtr removeArchive(const OdString &projectId, OdResult *result=NULL)
static OdSmartPtr< OdBcfSession > createObject(const OdString &author, const OdString &authoringToolId, const OdBcfDataAccessorPtr &pDataAccessor=OdBcfDataAccessorPtr())
OdString getScreenshot(const OdString &projectId, const OdGUID &topicId, const OdString &fileName=OdString(), OdResult *result=NULL)
void addComment(const OdString &projectId, const OdGUID &topicId, const OdString &comment, OdResult *result=NULL)
OdBcfTopicFolderPtr getTopicFolder(const OdString &projectId, const OdGUID &topicId, OdResult *result=NULL)
std::pair< OdArray< OdString >, OdString > ComponentColoring
Definition: BcfSession.h:398
OdDbHostAppProgressMeter * m_pMeter
Definition: BcfSession.h:456
OdBcfArchivePtr getArchive(const OdString &projectId, OdResult *result=NULL)
OdBcfVisualizationInfoPtr createVisualizationInfo(const OdBcfVisualizationInfoData *pVisualizationInfoData, const OdString &visInfoFileName, const OdString &screenshotFileName, OdBcfMarkupPtr pMarkup, OdInt32 viewPointIndex=OdBcf::Utils::getUnset< OdInt32 >(), OdResult *result=NULL) const
OdBcfColorPtr createColor(const OdArray< OdString > &ifcGuids, const OdString &color) const
OdBcfDataAccessorPtr m_pDataAccessor
Definition: BcfSession.h:454
OdBcfProjectExtensionPtr createProjectExtension(const OdBcfProjectExtensionData *pProjectExtensionData, OdResult *result=NULL) const
void saveProject(const OdString &projectId, const OdString &fileName=OdString(), OdBcfDataAccessorPtr pDataAccessor=OdBcfDataAccessorPtr(), OdResult *result=NULL)
void deleteComment(const OdString &projectId, const OdGUID &topicId, const OdGUID &commentId, OdResult *result=NULL)
void editComment(const OdString &projectId, const OdGUID &topicId, const OdGUID &commentId, const OdString &comment, OdResult *result=NULL)
void removeTopicFolder(const OdString &projectId, const OdGUID &topicId, OdResult *result=NULL)
Definition: OdGUID.h:33
GLsizeiptr size
Definition: gles2_ext.h:182
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
OdSmartPtr< OdBcfSession > OdBcfSessionPtr
Definition: BcfSession.h:468
OdSmartPtr< OdBcfArchive > OdBcfArchivePtr
Definition: BcfArchive.h:231
OdSmartPtr< OdBcfMarkup > OdBcfMarkupPtr
OdSmartPtr< OdBcfVersion > OdBcfVersionPtr
Definition: BcfArchive.h:44
OdSmartPtr< OdBcfComponentSelection > OdBcfComponentSelectionPtr
Definition: BcfComponents.h:40
OdArray< OdBcfTopicFolderPtr > OdBcfTopicFolderArray
Definition: BcfSession.h:112
OdSmartPtr< OdBcfComponents > OdBcfComponentsPtr
OdArray< OdBcfVisualizationInfoPtr > OdBcfVisualizationInfoArray
Definition: BcfSession.h:104
OdSmartPtr< OdBcfDataAccessor > OdBcfDataAccessorPtr
OdSmartPtr< OdBcfViewSetupHints > OdBcfViewSetupHintsPtr
Definition: BcfComponents.h:37
OdSmartPtr< OdBcfComponent > OdBcfComponentPtr
Definition: BcfColor.h:38
OdSmartPtr< OdBcfTopic > OdBcfTopicPtr
OdSmartPtr< OdBcfProjectExtension > OdBcfProjectExtensionPtr
Definition: BcfArchive.h:41
std::map< OdString, OdBcfArchivePtr > OdBcfArchiveMap
Definition: BcfArchive.h:236
OdSmartPtr< OdBcfBitmap > OdBcfBitmapPtr
Definition: BcfBitmap.h:224
OdSmartPtr< OdBcfViewPoint > OdBcfViewPointPtr
Definition: BcfMarkup.h:52
OdArray< OdBcfViewPointPtr > OdBcfViewPointArray
Definition: BcfMarkup.h:53
OdSmartPtr< OdBcfComponentVisibility > OdBcfComponentVisibilityPtr
Definition: BcfComponents.h:43
OdSmartPtr< OdBcfVisualizationInfo > OdBcfVisualizationInfoPtr
OdSmartPtr< OdBcfTopicFolder > OdBcfTopicFolderPtr
Definition: BcfArchive.h:47
OdSmartPtr< OdBcfProject > OdBcfProjectPtr
Definition: BcfProject.h:163
OdArray< OdBcfComponentPtr > OdBcfComponentArray
Definition: BcfColor.h:39
OdSmartPtr< OdBcfComponentColoring > OdBcfComponentColoringPtr
OdSmartPtr< OdBcfColor > OdBcfColorPtr
Definition: BcfColor.h:131