CFx SDK Documentation  2020SP3
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
OdDAI::Session::m_knownServers
OdArray< RepositoryPtr > m_knownServers
Definition: daiSession.h:95
OdDAI::Session::openRepo
void openRepo(RepositoryPtr &pRepository)
daiErrorId.h
OdDAI::Repository
Definition: daiRepository.h:54
OdDAI::Session::isRecordingOn
bool isRecordingOn()
name
GLuint const GLchar * name
Definition: gles2_ext.h:265
OdDAI::Session::errors
const OdArray< daiErrorEventPtr > & errors()
OdDAI::Session::createRepo
RepositoryPtr createRepo(const OdAnsiString &name)
OdDAI::Session::stopEventRecording
void stopEventRecording()
OdSharedPtr
Definition: SharedPtr.h:49
OdDAI::Session::m_activeServers
OdArray< RepositoryPtr > m_activeServers
Definition: daiSession.h:96
OdDAI::Session::m_errors
OdArray< daiErrorEventPtr > m_errors
Definition: daiSession.h:94
OdArray
Definition: OdArray.h:591
OdDAI::Session::closeRepo
void closeRepo(RepositoryPtr &pRepository)
OdDAI::daiErrorId
unsigned int daiErrorId
Definition: daiErrorId.h:90
OdDAI::Session::recordError
void recordError(const char *functionID, daiErrorId error, const char *descpt)
RxObject.h
OdDAI::Session::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(Session)
OdDAI
Definition: daiAccessDefines.h:31
OdDAI::Session::m_recordingActive
bool m_recordingActive
Definition: daiSession.h:93
OdDAI::Session
Definition: daiSession.h:55
OdDAI::Session::openSession
static OdSmartPtr< Session > openSession()
OdArray.h
OdSmartPtr< Repository >
OdDAI::Session::Session
Session()
OdDAI::Session::m_activeModels
OdArray< ModelPtr > m_activeModels
Definition: daiSession.h:97
SharedPtr.h
OdDAI::ModelPtr
OdSmartPtr< Model > ModelPtr
Definition: daiModel.h:56
OdaCommon.h
OdPlatformSettings.h
daiBuildOptions.h
OdDAI::Session::findRepo
RepositoryPtr findRepo(const OdAnsiString &name)
OdDAI::SessionPtr
OdSmartPtr< Session > SessionPtr
Definition: daiSession.h:102
OdDAI::SessionInstance
Definition: daiSessionInstance.h:38
OdDAI::daiErrorEventPtr
OdSharedPtr< daiErrorEvent > daiErrorEventPtr
Definition: daiErrorEvent.h:36
OdDAI::Session::createRepoFromFile
RepositoryPtr createRepoFromFile(const OdAnsiString &fileName, const OdAnsiString &name="")
OdDAI::Session::startEventRecording
void startEventRecording()
daiSessionInstance.h
RxObjectImpl.h
OdDAI::Session::closeSession
void closeSession()
DAI_EXPORT
#define DAI_EXPORT
Definition: daiBuildOptions.h:28
OdDAI::RepositoryPtr
OdSmartPtr< Repository > RepositoryPtr
Definition: daiRepository.h:213