Panda3D
 All Classes Functions Variables Enumerations
configVariableInt64.h
00001 // Filename: configVariableInt64.h
00002 // Created by:  drose (19Dec07)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef CONFIGVARIABLEINT64_H
00016 #define CONFIGVARIABLEINT64_H
00017 
00018 #include "dtoolbase.h"
00019 #include "configVariable.h"
00020 #include "numeric_types.h"
00021 
00022 ////////////////////////////////////////////////////////////////////
00023 //       Class : ConfigVariableInt64
00024 // Description : This is a convenience class to specialize
00025 //               ConfigVariable as a 64-bit integer type.
00026 ////////////////////////////////////////////////////////////////////
00027 class EXPCL_DTOOLCONFIG ConfigVariableInt64 : public ConfigVariable {
00028 PUBLISHED:
00029   INLINE ConfigVariableInt64(const string &name);
00030   INLINE ConfigVariableInt64(const string &name, PN_int64 default_value,
00031                              const string &description = string(), 
00032                              PN_int64 flags = 0);
00033   INLINE ConfigVariableInt64(const string &name, const string &default_value,
00034                              const string &description = string(), 
00035                              PN_int64 flags = 0);
00036 
00037   INLINE void operator = (PN_int64 value);
00038   INLINE operator PN_int64 () const;
00039 
00040   INLINE PN_int64 size() const;
00041   INLINE PN_int64 operator [] (int n) const;
00042 
00043   INLINE void set_value(PN_int64 value);
00044   INLINE PN_int64 get_value() const;
00045   INLINE PN_int64 get_default_value() const;
00046 
00047   INLINE PN_int64 get_word(int n) const;
00048   INLINE void set_word(int n, PN_int64 value);
00049 
00050 private:
00051   void set_default_value(PN_int64 default_value);
00052 
00053 private:
00054   AtomicAdjust::Integer _local_modified;
00055   PN_int64 _cache;
00056 };
00057 
00058 #include "configVariableInt64.I"
00059 
00060 #endif
 All Classes Functions Variables Enumerations