VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtNameValueLists.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
7 
8 #pragma once
9 
13 
14 namespace makArchives
15 {
16 
22  {
23  public:
26 
29 
31  DtNameValueLists& operator=(const DtNameValueLists& rhs);
32 
34  bool operator==(const DtNameValueLists& rhs) const;
35 
37  bool operator!=(const DtNameValueLists& rhs);
38 
40  typedef std::map<std::string, int> ParametersInt;
42  typedef std::map<std::string, bool> ParametersBool;
43  typedef std::map<std::string, double> ParametersDouble;
44  typedef std::map<std::string, std::string> ParametersString;
46 
48  int parameterInt( const std::string& parameterName ) const;
50  double parameterDouble( const std::string& parameterName ) const;
51  bool parameterBool( const std::string& parameterName ) const;
52  const std::string& parameterString( const std::string& parameterName ) const;
54 
56  void setParameterInt( const std::string& parameterName, int value );
58  void setParameterDouble( const std::string& parameterName, double value );
59  void setParameterBool( const std::string& parameterName, bool value );
60  void setParameterString( const std::string& parameterName, const std::string& value );
62 
64  bool hasParameterInt( const std::string& parameterName ) const;
66  bool hasParameterDouble( const std::string& parameterName ) const;
67  bool hasParameterBool( const std::string& parameterName ) const;
68  bool hasParameterString( const std::string& parameterName ) const;
70  bool hasParameter( const std::string& parameterName ) const;
72 
74  const ParametersInt& parametersInt() const;
76  const ParametersDouble& parametersDouble() const;
77  const ParametersBool& parametersBool() const;
78  const ParametersString& parametersString() const;
80 
82  void setParametersInt(const ParametersInt& parameters);
84  void setParametersBool(const ParametersBool& parameters);
85  void setParametersDouble(const ParametersDouble& parameters);
86  void setParametersString(const ParametersString& parameters);
88 
89  protected:
90  friend class boost::serialization::access;
91 
92  template<class Archive>
93  void serialize(Archive & ar, const unsigned int version)
94  {
95  ar & BOOST_SERIALIZATION_NVP(myParametersInt);
96  ar & BOOST_SERIALIZATION_NVP(myParametersBool);
97  ar & BOOST_SERIALIZATION_NVP(myParametersDouble);
98  ar & BOOST_SERIALIZATION_NVP(myParametersString);
99  }
100 
105  };
106 }
108 
ParametersInt myParametersInt
Definition: DtNameValueLists.h:101
BOOST_CLASS_VERSION(makArchives::DtDiGuySettingsRecord, 3)
std::map< std::string, int > ParametersInt
Map types for image task parameter storage.
Definition: DtNameValueLists.h:41
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
void serialize(Archive &ar, const unsigned int version)
Definition: DtNameValueLists.h:93
Contains DLL export macros.
ParametersString myParametersString
Definition: DtNameValueLists.h:103
std::map< std::string, bool > ParametersBool
Map types for image task parameter storage.
Definition: DtNameValueLists.h:42
std::map< std::string, std::string > ParametersString
Map types for image task parameter storage.
Definition: DtNameValueLists.h:44
ParametersDouble myParametersDouble
Definition: DtNameValueLists.h:102
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
#define DT_DLL_MAKARCHIVES
Definition: makArchives.h:31
ParametersBool myParametersBool
Definition: DtNameValueLists.h:104
Inherit this is you need a list of name/value pairs. Supports a list for each of int, double, string, and bool types.
Definition: DtNameValueLists.h:21
std::map< std::string, double > ParametersDouble
Map types for image task parameter storage.
Definition: DtNameValueLists.h:43

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)