VR-Forces 4.6 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
intSetting.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2009 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: intSetting.h,v $ $Revision: 1.3 $ $State: Exp $
7
*******************************************************************************/
8
9
// \file intSetting.h
10
// \brief Generic intean object for use with DtSettingsManager
11
// This is a general purpose int object which is instantiated by
12
// DtSettingsManager::addIndependentInt.
13
14
#ifndef intSetting_H_
15
#define intSetting_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
DtIntSetting
:
public
DtSettingsObject
31
{
32
public
:
33
// Default constructor, required for deserialization
34
DtIntSetting
();
35
36
// Constructor
37
DtIntSetting
(std::string name,
int
value);
38
39
// Copy constructor
40
DtIntSetting
(
const
DtIntSetting
& 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
int
value()
const
;
58
void
setValue(
int
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
int
myValue
;
75
};
76
77
#endif
Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)