14#ifndef CONFIGVARIABLE_H
15#define CONFIGVARIABLE_H
31class EXPCL_DTOOL_PRC ConfigVariable :
public ConfigVariableBase {
33 INLINE ConfigVariable(
const std::string &name, ValueType type);
34 INLINE ConfigVariable(
const std::string &name, ValueType type,
35 const std::string &description,
int flags);
38 INLINE
explicit ConfigVariable(
const std::string &name);
39 INLINE ~ConfigVariable();
50 INLINE
bool has_string_word(
size_t n)
const;
51 INLINE
bool has_bool_word(
size_t n)
const;
52 INLINE
bool has_int_word(
size_t n)
const;
53 INLINE
bool has_int64_word(
size_t n)
const;
54 INLINE
bool has_double_word(
size_t n)
const;
56 INLINE std::string get_string_word(
size_t n)
const;
57 INLINE
bool get_bool_word(
size_t n)
const;
58 INLINE
int get_int_word(
size_t n)
const;
59 INLINE int64_t get_int64_word(
size_t n)
const;
60 INLINE
double get_double_word(
size_t n)
const;
62 INLINE
void set_string_word(
size_t n,
const std::string &value);
63 INLINE
void set_bool_word(
size_t n,
bool value);
64 INLINE
void set_int_word(
size_t n,
int value);
65 INLINE
void set_int64_word(
size_t n, int64_t value);
66 INLINE
void set_double_word(
size_t n,
double value);
69 INLINE
bool is_constructed()
const;
70 void report_unconstructed()
const;
A single declaration of a config variable, typically defined as one line in a .prc file,...
void clear_value()
Removes the value assigned to this variable, and lets its original value (as read from the prc files)...
size_t get_num_words() const
Returns the number of words in the variable's value.
const std::string & get_string_value() const
Returns the toplevel value of the variable, formatted as a string.
void set_string_value(const std::string &value)
Changes the value assigned to this variable.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.