RAMSES Documentation  27.0.130
Information for RAMSES users and developers
RamsesFramework.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2015 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_RAMSESFRAMEWORK_H
10 #define RAMSES_RAMSESFRAMEWORK_H
11 
16 
17 #include <memory>
18 #include <string>
19 #include <cstdint>
20 
21 namespace ramses
22 {
23  class DcsmProvider;
24  class DcsmConsumer;
25  class RamsesRenderer;
26  class RamsesClient;
27  class RendererConfig;
28  class IRamshCommand;
29 
35  {
36  public:
41 
48  RamsesFramework(int32_t argc, char const* const* argv);
49 
55  explicit RamsesFramework(const RamsesFrameworkConfig& config);
56 
67 
73  bool isConnected() const;
74 
82 
97  RamsesClient* createClient(const char* applicationName);
98 
111 
128 
141 
155 
167 
182 
193 
205  static void SetConsoleLogLevel(ELogLevel logLevel);
206 
222  static void SetLogHandler(const LogHandlerFunc& logHandlerFunc);
223 
237 
255  status_t addRamshCommand(const std::shared_ptr<IRamshCommand>& command);
256 
268  status_t executeRamshCommand(const std::string& input);
269 
278  ~RamsesFramework() override;
279 
283  class RamsesFrameworkImpl& impl;
284 
289  RamsesFramework(const RamsesFramework& other) = delete;
290 
296  RamsesFramework& operator=(const RamsesFramework& other) = delete;
297  };
298 }
299 
300 #endif
#define RAMSES_API
Definition: APIExport.h:35
Class representing DCSM consumer side.
Definition: DcsmConsumer.h:27
Class used to offer ramses content and meta infos to a consumer and synchronize actions between clien...
Definition: DcsmProvider.h:28
Entry point of RAMSES client API.
Definition: RamsesClient.h:34
The RamsesFrameworkConfig holds a set of parameters to be used to initialize ramses.
Definition: RamsesFrameworkConfig.h:23
Class representing ramses framework components that are needed to initialize an instance of ramses cl...
Definition: RamsesFramework.h:35
RamsesRenderer * createRenderer(const RendererConfig &config)
Create a new RamsesRenderer linked to this framework. Only one RamsesRenderer can exist per RamsesFra...
RamsesFramework(const RamsesFramework &other)=delete
Deleted copy constructor.
RamsesFramework()
Default constructor.
status_t executeRamshCommand(const std::string &input)
Execute a ramsh command programmatically.
status_t addRamshCommand(const std::shared_ptr< IRamshCommand > &command)
Register a ramsh command that can be invoked via console and DLT injection.
DcsmProvider * createDcsmProvider()
Create a new DcsmProvider linked to this framework. Only one DcsmProvider can exist per RamsesFramewo...
static void SetLogHandler(const LogHandlerFunc &logHandlerFunc)
status_t destroyClient(RamsesClient &client)
Destroy a RamsesClient created with this framework. This method will fail when handed an object creat...
status_t connect()
Tries to establish a connection to the RAMSES system.
RamsesFramework & operator=(const RamsesFramework &other)=delete
Deleted copy assignment.
status_t destroyDcsmConsumer(const DcsmConsumer &consumer)
Destroy a DcsmConsumer created with this framework. This method will fail when handed an object creat...
bool isConnected() const
Check if the RamsesClient is connected or not.
status_t destroyDcsmProvider(const DcsmProvider &provider)
Destroy a DcsmProvider created with this framework. This method will fail when handed an object creat...
RamsesClient * createClient(const char *applicationName)
Create a new RamsesClient linked to this framework. Creation of multiple clients is supported....
RamsesFramework(const RamsesFrameworkConfig &config)
Constructor of RamsesFramework using RamsesFrameworkConfig object.
~RamsesFramework() override
Destructor of RamsesFramework.
static void SetConsoleLogLevel(ELogLevel logLevel)
Set the log level for all console log messages and apply it immediately.
RamsesFramework(int32_t argc, char const *const *argv)
Constructor of RamsesFramework using command line parameters.
DcsmConsumer * createDcsmConsumer()
Create a new DcsmConsumer linked to this framework. Only one DcsmConsumer can exist per RamsesFramewo...
class RamsesFrameworkImpl & impl
Definition: RamsesFramework.h:283
status_t destroyRenderer(RamsesRenderer &renderer)
Destroy a RamsesRenderer created with this framework. This method will fail when handed an object cre...
static uint64_t GetSynchronizedClockMilliseconds()
status_t disconnect()
Disconnects the RamsesClient from the system.
RamsesRenderer is the main renderer component which provides API to configure and control the way con...
Definition: RamsesRenderer.h:37
The RendererConfig holds a set of parameters to be used to initialize a renderer.
Definition: RendererConfig.h:26
The StatusObject provides status message handling.
Definition: StatusObject.h:22
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
ELogLevel
Type of Ramses Log Level.
Definition: RamsesFrameworkTypes.h:177
std::function< void(ELogLevel, const std::string &, const std::string &)> LogHandlerFunc
Definition: RamsesFrameworkTypes.h:197
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26