OSVR-Core
ConfigureServerFromFile.h
Go to the documentation of this file.
1 
11 // Copyright 2014 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 #ifndef INCLUDED_ConfigureServerFromFile_h_GUID_9DA4C152_2AE4_4394_E19E_C0B7EA41804F
26 #define INCLUDED_ConfigureServerFromFile_h_GUID_9DA4C152_2AE4_4394_E19E_C0B7EA41804F
27 
28 // Internal Includes
30 #include <osvr/Server/Server.h>
31 #include <osvr/Util/Logger.h>
32 #include <osvr/Util/LogNames.h>
33 
34 // Library/third-party includes
35 // - none
36 
37 // Standard includes
38 #include <vector>
39 #include <string>
40 
41 namespace osvr {
42 namespace server {
43 
44  inline const char *getDefaultConfigFilename() {
45  return "osvr_server_config.json";
46  }
47 
54  OSVR_SERVER_EXPORT ServerPtr configureServerFromFile(std::string const &configName);
55 
56  OSVR_SERVER_EXPORT ServerPtr configureServerFromString(std::string const &json);
57 
62  std::vector<std::string> const &configNames);
63 
64 } // namespace server
65 } // namespace osvr
66 
67 #endif // INCLUDED_ConfigureServerFromFile_h_GUID_9DA4C152_2AE4_4394_E19E_C0B7EA41804F
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
OSVR_SERVER_EXPORT ServerPtr configureServerFromFile(std::string const &configName)
This uses a file name to attempt to configure the server with that config file.
Definition: ConfigureServerFromFile.cpp:167
Header declaring osvr::server::Server.
OSVR_SERVER_EXPORT ServerPtr configureServerFromFirstFileInList(std::vector< std::string > const &configNames)
This iterates over a vector that contains a list of potential config files, and uses the first workin...
Definition: ConfigureServerFromFile.cpp:181
shared_ptr< Server > ServerPtr
How one should hold a Server.
Definition: ServerPtr.h:39
Header to include for OSVR-internal usage of the logging mechanism: provides the needed definition of...
Header.