TParameterDefinitions.h
Go to the documentation of this file.
1 /*+-------------------------------------------------------------------------+
2  | MultiVehicle simulator (libmvsim) |
3  | |
4  | Copyright (C) 2014-2020 Jose Luis Blanco Claraco |
5  | Copyright (C) 2017 Borys Tymchenko (Odessa Polytechnic University) |
6  | Distributed under 3-clause BSD License |
7  | See COPYING |
8  +-------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <cstdlib>
12 #include <map>
13 #include <string>
14 
15 namespace mvsim
16 {
35 {
36  const char* frmt = nullptr;
37  void* val = nullptr;
38 
39  TParamEntry() = default;
40 
41  template <typename T>
42  TParamEntry(const char* frmt_, T* targetVariable)
43  : frmt(frmt_), val(reinterpret_cast<void*>(targetVariable))
44  {
45  }
46 
51  void parse(
52  const std::string& str, const std::string& varName,
53  const std::map<std::string, std::string>& variableNamesValues = {},
54  const char* functionNameContext = "") const;
55 };
56 
60 using TParameterDefinitions = std::map<std::string, TParamEntry>;
61 
62 } // namespace mvsim
GLvoid *typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
std::map< std::string, TParamEntry > TParameterDefinitions
void parse(const std::string &str, const std::string &varName, const std::map< std::string, std::string > &variableNamesValues={}, const char *functionNameContext="") const
Definition: xml_utils.cpp:32
TParamEntry()=default
TParamEntry(const char *frmt_, T *targetVariable)
GLuint GLfloat * val


mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:51