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