Panda3D
configVariableInt64.h
1 // Filename: configVariableInt64.h
2 // Created by: drose (19Dec07)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef CONFIGVARIABLEINT64_H
16 #define CONFIGVARIABLEINT64_H
17 
18 #include "dtoolbase.h"
19 #include "configVariable.h"
20 #include "numeric_types.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : ConfigVariableInt64
24 // Description : This is a convenience class to specialize
25 // ConfigVariable as a 64-bit integer type.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_DTOOLCONFIG ConfigVariableInt64 : public ConfigVariable {
28 PUBLISHED:
29  INLINE ConfigVariableInt64(const string &name);
30  INLINE ConfigVariableInt64(const string &name, PN_int64 default_value,
31  const string &description = string(),
32  PN_int64 flags = 0);
33  INLINE ConfigVariableInt64(const string &name, const string &default_value,
34  const string &description = string(),
35  PN_int64 flags = 0);
36 
37  INLINE void operator = (PN_int64 value);
38  INLINE operator PN_int64 () const;
39 
40  INLINE PN_int64 size() const;
41  INLINE PN_int64 operator [] (int n) const;
42 
43  INLINE void set_value(PN_int64 value);
44  INLINE PN_int64 get_value() const;
45  INLINE PN_int64 get_default_value() const;
46 
47  INLINE PN_int64 get_word(int n) const;
48  INLINE void set_word(int n, PN_int64 value);
49 
50 private:
51  void set_default_value(PN_int64 default_value);
52 
53 private:
54  AtomicAdjust::Integer _local_modified;
55  PN_int64 _cache;
56 };
57 
58 #include "configVariableInt64.I"
59 
60 #endif
const ConfigDeclaration * get_default_value() const
Returns the default variable specified for this variable.
This is a convenience class to specialize ConfigVariable as a 64-bit integer type.
This is a generic, untyped ConfigVariable.