VR-Forces 4.6.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
makSettingsManager
doubleSetting.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2009 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: doubleSetting.h,v $ $Revision: 1.4 $ $State: Exp $
7
*******************************************************************************/
8
9
// \file doubleSetting.h
10
// \brief Generic double object for use with DtSettingsManager
11
// This is a general purpose double object which is instantiated by
12
// DtSettingsManager::addIndependentDouble.
13
14
#ifndef doubleSetting_H_
15
#define doubleSetting_H_
16
17
#include "
makSettingsManager/settingsObject.h
"
18
#include "
makSettingsManager/settingsObjectFactory.h
"
19
20
#include <boost/serialization/nvp.hpp>
21
#include <boost/serialization/base_object.hpp>
22
#include <boost/serialization/export.hpp>
23
24
#include <boost/archive/xml_iarchive.hpp>
25
#include <boost/archive/xml_oarchive.hpp>
26
#include <boost/archive/text_iarchive.hpp>
27
#include <boost/archive/text_oarchive.hpp>
28
29
#include "
makSettingsManager/makSettingsManagerDefines.h
"
30
class
DT_DLL_makSettingsManager
DtDoubleSetting
:
public
DtSettingsObject
31
{
32
public
:
33
// Default constructor, required for deserialization
34
DtDoubleSetting
();
35
36
// Constructor
37
DtDoubleSetting
(std::string name,
double
value);
38
39
// Copy constructor
40
DtDoubleSetting
(
const
DtDoubleSetting
& orig);
41
42
// Equality operator
43
virtual
bool
operator==
(
const
DtSettingsObject
& other)
const
;
44
45
// Inequality operator
46
virtual
bool
operator!=
(
const
DtSettingsObject
& other)
const
;
47
48
// Used by DtSettingsManager::setSetting when it needs to update an
49
// existing DtSettingsObject.
50
virtual
bool
setFrom
(
const
DtSettingsObject
* other);
51
52
// Clone operator, returns a new settings which is a copy of this one.
53
virtual
DtSettingsObject
*
clone
()
const
;
54
55
// The double value
57
double
value()
const
;
58
void
setValue(
double
value);
60
61
private
:
62
// Serialization support
63
friend
class
boost::serialization::access;
64
template
<
class
Archive>
65
void
serialize
(Archive & ar,
const
unsigned
int
version)
66
{
67
// Serialize the base class
68
ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
DtSettingsObject
);
69
// Serialize the members
70
ar & BOOST_SERIALIZATION_NVP(myValue);
71
}
72
73
protected
:
74
double
myValue
;
75
};
76
77
#endif
Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)