CFx SDK Documentation  2023 SP0
BcfSession.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2020, 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-2020 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 
34 
38 namespace OdBcf {
39 
40  class OdBcfProjectExtensionData;
41  class OdBcfProjectExtension;
43 
44  class OdBcfProjectData;
45  class OdBcfProject;
47 
48  class OdBcfVersion;
50 
51  class OdBcfTopicData;
52  class OdBcfTopic;
54 
55  class OdBcfMarkup;
57 
58  class OdBcfViewPoint;
61 
62  class OdBcfComponent;
65 
66  class OdBcfViewSetupHints;
68 
69  class OdBcfComponentSelection;
71 
72  class OdBcfComponentVisibility;
74 
75  class OdBcfColor;
77 
78  class OdBcfComponentColoring;
80 
81  class OdBcfComponents;
83 
84  class OdBcfBitmapData;
85  class OdBcfBitmap;
87 
88  class OdBcfVisualizationInfoData;
89  class OdBcfVisualizationInfo;
92 
93  class OdBcfTopicFolder;
96 
97  class OdBcfArchive;
99  typedef std::map<OdString, OdBcfArchivePtr> OdBcfArchiveMap;
100 
101  class OdBcfDataAccessor;
103 
108  {
109  public:
110 
111  //DOM-IGNORE-BEGIN
113  //DOM-IGNORE-END
114 
123  const OdString &author,
124  const OdString &authoringToolId,
125  const OdBcfDataAccessorPtr &pDataAccessor = OdBcfDataAccessorPtr());
126 
127  //const OdBcfArchiveMap& loadProjects(OdResult *result = NULL);
128 
137  const OdString &projectId,
138  const OdString &fileName = OdString(),
139  OdBcfDataAccessorPtr pDataAccessor = OdBcfDataAccessorPtr(),
140  OdResult *result = NULL);
141 
150  const OdString &fileName,
151  OdBcfDataAccessorPtr pDataAccessor = OdBcfDataAccessorPtr(),
152  OdResult *result = NULL);
153 
160  OdString addArchive(const OdBcfArchivePtr &pArchive, OdResult *result = NULL);
161 
168  OdBcfArchivePtr getArchive(const OdString &projectId, OdResult *result = NULL);
169 
176  bool validateArchive(const OdString &projectId, OdResult *result = NULL) const;
177 
184  OdBcfArchivePtr removeArchive(const OdString &projectId, OdResult *result = NULL);
185 
187  {
188  kSortParameter_Guid = 0,
191  kSortParameter_Index
192  };
193 
201  OdBcfTopicFolderArray getTopics(const OdString &projectId, eSortParameter sortParameter = kSortParameter_Guid, OdResult *result = NULL);
202 
210  OdGUID addTopicFolder(const OdString &projectId, const OdBcfTopicFolderPtr& pTopicFolder, OdResult *result = NULL);
211 
219  OdBcfTopicFolderPtr getTopicFolder(const OdString &projectId, const OdGUID &topicId, OdResult *result = NULL);
220 
228  void removeTopicFolder(const OdString &projectId, const OdGUID &topicId, OdResult *result = NULL);
229 
240  const OdString &projectId,
241  const OdGUID &topicId,
242  const OdString &fileName,
243  const char *data,
244  unsigned int size,
245  OdResult *result = NULL);
246 
256  OdString getScreenshot(const OdString &projectId, const OdGUID &topicId, const OdString &fileName = OdString(), OdResult *result = NULL);
257 
264  OdBcfProjectPtr createProject(const OdBcfProjectData *pProjectData, OdResult *result = NULL) const;
265 
273 
280 
287  OdBcfTopicPtr createTopic(const OdBcfTopicData *pTopicData, OdResult *result = NULL) const;
288 
295 
303 
311  OdBcfComponentVisibilityPtr createComponentVisibility(const OdArray<OdString> &ifcGuids, bool defaultVisibility = false, OdResult *result = NULL) const;
312 
316  typedef std::pair<OdArray<OdString>, OdString> ComponentColoring;
317 
322 
330 
337  OdBcfBitmapPtr createBitmap(const OdBcfBitmapData *pBitmapData, OdResult *result = NULL) const;
338 
349  const OdBcfVisualizationInfoData *pVisualizationInfoData,
350  const OdString &visInfoFileName,
351  const OdString &screenshotFileName,
352  OdBcfMarkupPtr pMarkup,
353  OdResult *result = NULL) const;
354 
355  //DOM-IGNORE-BEGIN
356  protected:
361 
362  OdGUID getTopicId(const OdBcfTopicFolderPtr &pTopicFolder, OdResult *result = NULL) const;
363  const OdBcfComponentPtr createComponent(const OdString &ifcGuid) const;
365  OdBcfColorPtr createColor(const OdArray<OdString> &ifcGuids, const OdString &color) const;
366 
367  //DOM-IGNORE-END
368  };
369 
374 
375 } //namespace OdBcf
376 
377 #endif // _BFC_SESSION_H
#define NULL
Definition: GsProperties.h:177
#define BCF_EXPORT
OdResult
Definition: OdResult.h:29
OdString OdString
Definition: OdString.h:1224
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 OdSmartPtr< OdBcfSession > createObject(const OdString &author, const OdString &authoringToolId, const OdBcfDataAccessorPtr &pDataAccessor=OdBcfDataAccessorPtr())
OdString loadProject(const OdString &fileName, OdBcfDataAccessorPtr pDataAccessor=OdBcfDataAccessorPtr(), OdResult *result=NULL)
OdBcfComponentColoringPtr createComponentColoring(const ComponentColoringArray &componentColoring, OdResult *result=NULL) const
OdGUID addTopicFolder(const OdString &projectId, const OdBcfTopicFolderPtr &pTopicFolder, OdResult *result=NULL)
OdArray< ComponentColoring > ComponentColoringArray
Definition: BcfSession.h:321
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:360
OdBcfComponentVisibilityPtr createComponentVisibility(const OdArray< OdString > &ifcGuids, bool defaultVisibility=false, OdResult *result=NULL) const
OdBcfVisualizationInfoPtr createVisualizationInfo(const OdBcfVisualizationInfoData *pVisualizationInfoData, const OdString &visInfoFileName, const OdString &screenshotFileName, OdBcfMarkupPtr pMarkup, OdResult *result=NULL) const
void addScreenshot(const OdString &projectId, const OdGUID &topicId, const OdString &fileName, const char *data, unsigned int size, OdResult *result=NULL)
ODRX_DECLARE_MEMBERS(OdBcfSession)
OdString m_authoringToolId
Definition: BcfSession.h:358
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)
OdString getScreenshot(const OdString &projectId, const OdGUID &topicId, const OdString &fileName=OdString(), OdResult *result=NULL)
OdBcfTopicFolderPtr getTopicFolder(const OdString &projectId, const OdGUID &topicId, OdResult *result=NULL)
std::pair< OdArray< OdString >, OdString > ComponentColoring
Definition: BcfSession.h:316
OdGUID getTopicId(const OdBcfTopicFolderPtr &pTopicFolder, OdResult *result=NULL) const
OdBcfArchivePtr getArchive(const OdString &projectId, OdResult *result=NULL)
OdBcfColorPtr createColor(const OdArray< OdString > &ifcGuids, const OdString &color) const
OdBcfDataAccessorPtr m_pDataAccessor
Definition: BcfSession.h:359
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 removeTopicFolder(const OdString &projectId, const OdGUID &topicId, OdResult *result=NULL)
Definition: OdGUID.h:29
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:373
OdSmartPtr< OdBcfArchive > OdBcfArchivePtr
Definition: BcfArchive.h:117
OdSmartPtr< OdBcfMarkup > OdBcfMarkupPtr
OdSmartPtr< OdBcfVersion > OdBcfVersionPtr
Definition: BcfArchive.h:43
OdSmartPtr< OdBcfComponentSelection > OdBcfComponentSelectionPtr
Definition: BcfComponents.h:39
OdArray< OdBcfTopicFolderPtr > OdBcfTopicFolderArray
Definition: BcfSession.h:95
OdSmartPtr< OdBcfComponents > OdBcfComponentsPtr
OdArray< OdBcfVisualizationInfoPtr > OdBcfVisualizationInfoArray
Definition: BcfSession.h:91
OdSmartPtr< OdBcfDataAccessor > OdBcfDataAccessorPtr
OdSmartPtr< OdBcfViewSetupHints > OdBcfViewSetupHintsPtr
Definition: BcfComponents.h:36
OdSmartPtr< OdBcfComponent > OdBcfComponentPtr
Definition: BcfColor.h:37
OdSmartPtr< OdBcfTopic > OdBcfTopicPtr
OdSmartPtr< OdBcfProjectExtension > OdBcfProjectExtensionPtr
Definition: BcfArchive.h:40
std::map< OdString, OdBcfArchivePtr > OdBcfArchiveMap
Definition: BcfArchive.h:122
OdSmartPtr< OdBcfBitmap > OdBcfBitmapPtr
Definition: BcfBitmap.h:117
OdSmartPtr< OdBcfViewPoint > OdBcfViewPointPtr
Definition: BcfMarkup.h:47
OdArray< OdBcfViewPointPtr > OdBcfViewPointArray
Definition: BcfMarkup.h:49
OdSmartPtr< OdBcfComponentVisibility > OdBcfComponentVisibilityPtr
Definition: BcfComponents.h:42
OdSmartPtr< OdBcfVisualizationInfo > OdBcfVisualizationInfoPtr
OdSmartPtr< OdBcfTopicFolder > OdBcfTopicFolderPtr
Definition: BcfArchive.h:46
OdSmartPtr< OdBcfProject > OdBcfProjectPtr
Definition: BcfProject.h:102
OdArray< OdBcfComponentPtr > OdBcfComponentArray
Definition: BcfColor.h:39
OdSmartPtr< OdBcfComponentColoring > OdBcfComponentColoringPtr
OdSmartPtr< OdBcfColor > OdBcfColorPtr
Definition: BcfColor.h:105