26class EXPCL_DTOOL_DTOOLUTIL PandaSystem {
66 bool has_system(
const std::string &system)
const;
72 std::string
get_system_tag(
const std::string &system,
const std::string &tag)
const;
75 void set_system_tag(
const std::string &system,
const std::string &tag,
76 const std::string &value);
80 void output(std::ostream &out)
const;
81 void write(std::ostream &out)
const;
86 void reset_system_names();
88 void set_package_version_string(
const std::string &package_version_string);
89 void set_package_host_url(
const std::string &package_host_url);
91 typedef pmap<std::string, std::string> SystemTags;
92 typedef pmap<std::string, SystemTags> Systems;
93 typedef pvector<std::string> SystemNames;
96 SystemNames _system_names;
97 bool _system_names_dirty;
99 std::string _package_version_string;
100 std::string _package_host_url;
102 static PandaSystem *_global_ptr;
108 static void init_type() {
113 static TypeHandle _type_handle;
115 friend class ConfigPageManager;
118inline std::ostream &operator << (std::ostream &out,
const PandaSystem &ps) {
This class is used as a namespace to group several global properties of Panda.
get_num_systems
Returns the number of Panda subsystems that have registered themselves.
get_sequence_version
Returns the sequence version number of the current version of Panda.
get_build_date
Returns a string representing the date and time at which this version of Panda (or at least dtool) wa...
is_official_version
Returns true if current version of Panda claims to be an "official" version, that is,...
get_system
Returns the nth Panda subsystem that has registered itself.
void set_system_tag(const std::string &system, const std::string &tag, const std::string &value)
Intended for use by each subsystem to register its set of capabilities at startup.
get_major_version
Returns the major version number of the current version of Panda.
get_platform
Returns a string representing the runtime platform that we are currently running on.
get_memory_alignment
Returns the memory alignment that Panda's allocators are using.
get_version_string
Returns the current version of Panda, expressed as a string, e.g.
get_git_commit
Returns a string representing the git commit hash that this source tree is based on,...
static std::string get_package_host_url()
Returns the URL of the download server that provides the Panda3D distributable package currently runn...
get_minor_version
Returns the minor version number of the current version of Panda.
get_distributor
Returns the string defined by the distributor of this version of Panda, or "homebuilt" if this versio...
get_compiler
Returns a string representing the compiler that was used to generate this version of Panda,...
static PandaSystem * get_global_ptr()
Returns the global PandaSystem object.
static std::string get_p3d_coreapi_version_string()
Returns the current version of Panda's Core API, expressed as a string of dot-delimited integers.
void add_system(const std::string &system)
Intended for use by each subsystem to register itself at startup.
bool has_system(const std::string &system) const
Returns true if the current version of Panda claims to have the indicated subsystem installed,...
std::string get_system_tag(const std::string &system, const std::string &tag) const
Returns the value associated with the indicated tag for the given system.
static std::string get_package_version_string()
Returns the version of the Panda3D distributable package that provides this build of Panda.
bool heap_trim(size_t pad)
Attempts to release memory back to the system, if possible.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...