14 #ifndef EXECUTIONENVIRONMENT_H    15 #define EXECUTIONENVIRONMENT_H    34   INLINE 
static bool has_environment_variable(
const std::string &var);
    35   INLINE 
static std::string get_environment_variable(
const std::string &var);
    36   INLINE 
static void set_environment_variable(
const std::string &var, 
const std::string &value);
    38   INLINE 
static void shadow_environment_variable(
const std::string &var, 
const std::string &value);
    39   INLINE 
static void clear_shadow(
const std::string &var);
    41   static std::string expand_string(
const std::string &str);
    43   INLINE 
static size_t get_num_args();
    44   INLINE 
static std::string get_arg(
size_t n);
    46   INLINE 
static std::string get_binary_name();
    47   INLINE 
static std::string get_dtool_name();
    49   INLINE 
static void set_binary_name(
const std::string &name);
    50   INLINE 
static void set_dtool_name(
const std::string &name);
    55   MAKE_MAP_PROPERTY(environment_variables, has_environment_variable,
    56                     get_environment_variable, set_environment_variable);
    58   MAKE_SEQ_PROPERTY(args, get_num_args, get_arg);
    59   MAKE_PROPERTY(binary_name, get_binary_name, set_binary_name);
    60   MAKE_PROPERTY(dtool_name, get_dtool_name, set_dtool_name);
    61   MAKE_PROPERTY(cwd, get_cwd);
    64   bool ns_has_environment_variable(
const std::string &var) 
const;
    65   std::string ns_get_environment_variable(
const std::string &var) 
const;
    66   void ns_set_environment_variable(
const std::string &var, 
const std::string &value);
    67   void ns_shadow_environment_variable(
const std::string &var, 
const std::string &value);
    68   void ns_clear_shadow(
const std::string &var);
    70   size_t ns_get_num_args() 
const;
    71   std::string ns_get_arg(
size_t n) 
const;
    73   std::string ns_get_binary_name() 
const;
    74   std::string ns_get_dtool_name() 
const;
    78   void read_environment_variables();
    82   typedef std::map<std::string, std::string> EnvironmentVariables;
    83   EnvironmentVariables _variables;
    85   typedef vector_string CommandArguments;
    86   CommandArguments _args;
    88   std::string _binary_name;
    89   std::string _dtool_name;
 PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
 
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
 
The name of a file, such as a texture file or an Egg file.
 
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
 
Encapsulates access to the environment variables and command-line arguments at the time of execution.