CFx SDK Documentation  2022 SP0
daiSession.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2019, 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-2019 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 _DAI_SESSION_H
25 #define _DAI_SESSION_H
26 
27 #include "OdPlatformSettings.h"
28 #include "OdaCommon.h"
29 #include "OdArray.h"
30 #include "RxObject.h"
31 #include "RxObjectImpl.h"
32 #include "SharedPtr.h"
33 
34 #include "daiBuildOptions.h"
35 #include "daiSessionInstance.h"
36 #include "daiError/daiErrorId.h"
37 
38 namespace OdDAI {
39 
40 #if defined(_MSC_VER)
41 #pragma warning(push)
42 #pragma warning(disable:4150)
43 #endif
44 
45  class Repository;
47 
48  class Model;
50 
51  class daiErrorEvent;
53 
55  {
56  public:
57 
58  //DOM-IGNORE-BEGIN
60  //DOM-IGNORE-END
61 
63 
65  void closeSession();
66 
67  RepositoryPtr createRepo(const OdAnsiString &name);
68  RepositoryPtr createRepoFromFile(const OdAnsiString &fileName, const OdAnsiString &name = "");
69  RepositoryPtr findRepo(const OdAnsiString &name);
70 
71  /* \delete
72  Opens an unopened repository which exists in the current session.
73  */
74  void openRepo(RepositoryPtr &pRepository);
75 
76  /* \details
77  Closes an opened repository assigned with this session.
78 
79  */
80  void closeRepo(RepositoryPtr &pRepository);
81 
83  void recordError(const char* functionID, daiErrorId error, const char* descpt);
84  Session& operator<< (const daiErrorEventPtr& eveentToRecord);
85 
86  bool isRecordingOn();
89 
90  protected:
91 
92  //Implementation m_sdaiImplementation;
98 
99  friend class Repository;
100  class EventHandler;
101  };
103 
104 #if defined(_MSC_VER)
105 #pragma warning(pop)
106 #endif
107 
108 }
109 
110 #endif // _DAI_SESSION_H
RepositoryPtr findRepo(const OdAnsiString &name)
OdArray< RepositoryPtr > m_activeServers
Definition: daiSession.h:96
void openRepo(RepositoryPtr &pRepository)
static OdSmartPtr< Session > openSession()
void closeSession()
OdArray< daiErrorEventPtr > m_errors
Definition: daiSession.h:94
void stopEventRecording()
void startEventRecording()
bool m_recordingActive
Definition: daiSession.h:93
OdArray< ModelPtr > m_activeModels
Definition: daiSession.h:97
OdArray< RepositoryPtr > m_knownServers
Definition: daiSession.h:95
RepositoryPtr createRepo(const OdAnsiString &name)
bool isRecordingOn()
const OdArray< daiErrorEventPtr > & errors()
void closeRepo(RepositoryPtr &pRepository)
ODRX_DECLARE_MEMBERS(Session)
RepositoryPtr createRepoFromFile(const OdAnsiString &fileName, const OdAnsiString &name="")
void recordError(const char *functionID, daiErrorId error, const char *descpt)
#define DAI_EXPORT
GLuint const GLchar * name
Definition: gles2_ext.h:265
unsigned int daiErrorId
Definition: daiErrorId.h:90
OdSmartPtr< Repository > RepositoryPtr
OdSharedPtr< daiErrorEvent > daiErrorEventPtr
Definition: daiErrorEvent.h:36
OdSmartPtr< Session > SessionPtr
Definition: daiSession.h:102
OdSmartPtr< Model > ModelPtr
Definition: daiModel.h:56