Panda3D
Public Types | Static Protected Member Functions
ConfigFlags Class Reference

This class is the base class of both ConfigVariable and ConfigVariableCore. More...

#include "configFlags.h"

Inheritance diagram for ConfigFlags:
ConfigDeclaration ConfigPageManager ConfigVariableBase ConfigVariableCore NotifyCategory ConfigVariable ConfigVariableList ConfigVariableSearchPath ConfigVariableBool ConfigVariableDouble ConfigVariableEnum< EnumType > ConfigVariableFilename ConfigVariableInt ConfigVariableInt64 ConfigVariableString

List of all members.

Public Types

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

Static Protected Member Functions

static AtomicAdjust::Integer initial_invalid_cache ()
 Returns a value that will be appropriate for initializing a local_modified value.
static void invalidate_cache ()
 Invalidates all of the global ConfigVariable caches in the world at once, by incrementing the global_modified counter.
static bool is_cache_valid (AtomicAdjust::Integer local_modified)
 Returns true if the local object's cache is still valid (based on a comparison of the supplied local_modified value with the global_modified value).
static void mark_cache_valid (AtomicAdjust::Integer &local_modified)
 Updates the indicated local_modified value so that the cache will appear to be valid, until someone next calls invalidate_cache().

Detailed Description

This class is the base class of both ConfigVariable and ConfigVariableCore.

It exists only to provide a convenient name scoping for some enumerated values common to both classes.

Definition at line 29 of file configFlags.h.


Member Function Documentation

AtomicAdjust::Integer ConfigFlags::initial_invalid_cache ( ) [inline, static, protected]

Returns a value that will be appropriate for initializing a local_modified value.

This value will indicate an invalid cache in the next call to is_cache_valid().

Definition at line 49 of file configFlags.I.

Referenced by ConfigVariableSearchPath::append_directory(), ConfigVariableSearchPath::append_path(), ConfigVariableSearchPath::clear_local_value(), ConfigVariableSearchPath::prepend_directory(), and ConfigVariableSearchPath::prepend_path().

void ConfigFlags::invalidate_cache ( ) [inline, static, protected]
bool ConfigFlags::is_cache_valid ( AtomicAdjust::Integer  local_modified) [inline, static, protected]

Returns true if the local object's cache is still valid (based on a comparison of the supplied local_modified value with the global_modified value).

Definition at line 24 of file configFlags.I.

Referenced by ConfigVariableBool::get_value(), ConfigVariableDouble::get_value(), ConfigVariableInt::get_value(), ConfigVariableInt64::get_value(), and ConfigVariableString::get_value().

void ConfigFlags::mark_cache_valid ( AtomicAdjust::Integer &  local_modified) [inline, static, protected]

Updates the indicated local_modified value so that the cache will appear to be valid, until someone next calls invalidate_cache().

Definition at line 36 of file configFlags.I.

Referenced by ConfigVariableBool::get_value(), ConfigVariableDouble::get_value(), ConfigVariableInt::get_value(), ConfigVariableInt64::get_value(), and ConfigVariableString::get_value().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations