VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
makSettingsManager
boolSetting.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2008 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: boolSetting.h,v $ $Revision: 1.6 $ $State: Exp $
7
*******************************************************************************/
8
9
// \file boolSetting.h
10
// \brief Generic boolean object for use with DtSettingsManager
11
// This is a general purpose boolean object which is instantiated by
12
// DtSettingsManager::addIndependentBool.
13
14
#ifndef boolSetting_H_
15
#define boolSetting_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
DtBoolSetting
:
public
DtSettingsObject
31
{
32
public
:
33
// Default constructor, required for deserialization
34
DtBoolSetting
();
35
36
// Constructor
37
DtBoolSetting
(std::string name,
bool
value);
38
39
// Copy constructor
40
DtBoolSetting
(
const
DtBoolSetting
& 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 boolean value
57
bool
value()
const
;
58
void
setValue(
bool
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
bool
myValue
;
75
};
76
77
78
#endif
Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)