Panda3D
Public Member Functions | Public Attributes | List of all members
ConfigVariableInt64 Class Reference

This is a convenience class to specialize ConfigVariable as a 64-bit integer type. More...

#include "configVariableInt64.h"

Inheritance diagram for ConfigVariableInt64:
ConfigVariable ConfigVariableBase ConfigFlags

Public Member Functions

 ConfigVariableInt64 (const std::string &name)
 
 ConfigVariableInt64 (const std::string &name, int64_t default_value, const std::string &description=std::string(), int flags=0)
 
 ConfigVariableInt64 (const std::string &name, const std::string &default_value, const std::string &description=std::string(), int flags=0)
 
int64_t get_default_value () const
 
int64_t get_value () const
 
int64_t get_word (size_t n) const
 Returns the variable's nth value. More...
 
int64_t operator [] (size_t n) const
 Returns the value of the variable's nth word. More...
 
 operator int64_t () const
 Returns the variable's value. More...
 
void operator= (int64_t value)
 Reassigns the variable's local value. More...
 
void set_value (int64_t value)
 
void set_word (size_t n, int64_t value)
 Reassigns the variable's nth value. More...
 
size_t size () const
 Returns the number of unique words in the variable. More...
 
- Public Member Functions inherited from ConfigVariable
 ConfigVariable (const std::string &name)
 Use this constructor to make a ConfigVariable of an unspecified type. More...
 
void clear_value ()
 Removes the value assigned to this variable, and lets its original value (as read from the prc files) show through. More...
 
size_t get_num_words () const
 Returns the number of words in the variable's value. More...
 
const std::string & get_string_value () const
 Returns the toplevel value of the variable, formatted as a string. More...
 
void set_string_value (const std::string &value)
 Changes the value assigned to this variable. More...
 
- Public Member Functions inherited from ConfigVariableBase
bool clear_local_value ()
 Removes the local value defined for this variable, and allows its value to be once again retrieved from the .prc files. More...
 
const std::string & get_description () const
 
int get_flags () const
 Returns the flags value as set by set_flags(). More...
 
const std::string & get_name () const
 
int get_trust_level () const
 
ValueType get_value_type () const
 
bool has_local_value () const
 Returns true if this variable's value has been shadowed by a local assignment (as created via make_local_value()), or false otherwise. More...
 
bool has_value () const
 Returns true if this variable has an explicit value, either from a prc file or locally set, or false if variable has its default value. More...
 
bool is_closed () const
 
bool is_dynamic () const
 
void output (std::ostream &out) const
 
void write (std::ostream &out) const
 

Public Attributes

 get_default_value
 Returns the variable's default value. More...
 
 get_value
 Returns the variable's value. More...
 
 set_value
 Reassigns the variable's local value. More...
 
- Public Attributes inherited from ConfigVariableBase
 get_description
 Returns the brief description of this variable, if it has been defined. More...
 
 get_name
 Returns the name of the variable. More...
 
 get_trust_level
 Returns the minimum trust_level a prc file must demonstrate in order to redefine the value for this variable. More...
 
 get_value_type
 Returns the stated type of this variable. More...
 
 is_closed
 Returns true if the variable is not trusted by any prc file (and hence cannot be modified from its compiled-in default value), or false for the normal case, in which the variable can be modified by any prc file at or above its trust level (see get_trust_level()). More...
 
 is_dynamic
 Returns true if the variable was indicated as "dynamic" by its constructor, indicating that its name was dynamically generated, possibly from a large pool, and it should not be listed along with the other variables. More...
 

Additional Inherited Members

- Public Types inherited from ConfigFlags
enum  ValueType {
  VT_undefined, VT_list, VT_string, VT_filename,
  VT_bool, VT_int, VT_double, VT_enum,
  VT_search_path, VT_int64, VT_color
}
 
enum  VariableFlags {
  F_trust_level_mask = 0x00000fff, F_open = 0x00001000, F_closed = 0x00002000, F_dynamic = 0x00004000,
  F_dconfig = 0x00008000
}
 

Detailed Description

This is a convenience class to specialize ConfigVariable as a 64-bit integer type.

Definition at line 25 of file configVariableInt64.h.

Member Function Documentation

◆ get_word()

int64_t ConfigVariableInt64::get_word ( size_t  n) const
inline

Returns the variable's nth value.

Definition at line 129 of file configVariableInt64.I.

Referenced by operator []().

◆ operator []()

int64_t ConfigVariableInt64::operator [] ( size_t  n) const
inline

Returns the value of the variable's nth word.

Definition at line 87 of file configVariableInt64.I.

References get_word().

◆ operator int64_t()

ConfigVariableInt64::operator int64_t ( ) const
inline

Returns the variable's value.

Definition at line 71 of file configVariableInt64.I.

◆ operator=()

void ConfigVariableInt64::operator= ( int64_t  value)
inline

Reassigns the variable's local value.

Definition at line 63 of file configVariableInt64.I.

References set_value.

◆ set_word()

void ConfigVariableInt64::set_word ( size_t  n,
int64_t  value 
)
inline

Reassigns the variable's nth value.

This makes a local copy of the variable's overall value.

Definition at line 138 of file configVariableInt64.I.

◆ size()

size_t ConfigVariableInt64::size ( ) const
inline

Returns the number of unique words in the variable.

Definition at line 79 of file configVariableInt64.I.

References ConfigVariable::get_num_words().

Member Data Documentation

◆ get_default_value

int64_t ConfigVariableInt64::get_default_value
inline

Returns the variable's default value.

Definition at line 45 of file configVariableInt64.h.

◆ get_value

int64_t ConfigVariableInt64::get_value
inline

Returns the variable's value.

Definition at line 44 of file configVariableInt64.h.

◆ set_value

void ConfigVariableInt64::set_value
inline

Reassigns the variable's local value.

Definition at line 44 of file configVariableInt64.h.

Referenced by operator=().


The documentation for this class was generated from the following files: