KiCad PCB EDA Suite
Loading...
Searching...
No Matches
env_vars.h File Reference

Functions related to environment variables, including help functions. More...

#include <kicommon.h>
#include <wx/string.h>
#include <map>
#include <vector>
#include <optional>

Go to the source code of this file.

Namespaces

namespace  ENV_VAR
 

Typedefs

using ENV_VAR::ENV_VAR_LIST = std::vector< wxString >
 

Functions

KICOMMON_API bool ENV_VAR::IsEnvVarImmutable (const wxString &aEnvVar)
 Determine if an environment variable is "predefined", i.e.
 
KICOMMON_API const ENV_VAR_LIST & ENV_VAR::GetPredefinedEnvVars ()
 Get the list of pre-defined environment variables.
 
KICOMMON_API wxString ENV_VAR::GetVersionedEnvVarName (const wxString &aBaseName)
 Constructs a versioned environment variable based on this KiCad major version.
 
KICOMMON_API std::optional< wxString > ENV_VAR::GetVersionedEnvVarValue (const std::map< wxString, ENV_VAR_ITEM > &aMap, const wxString &aBaseName)
 Attempts to retrieve the value of a versioned environment variable, such as KICAD8_TEMPLATE_DIR.
 
KICOMMON_API wxString ENV_VAR::LookUpEnvVarHelp (const wxString &aEnvVar)
 Look up long-form help text for a given environment variable.
 
template<typename VAL_TYPE >
KICOMMON_API std::optional< VAL_TYPE > ENV_VAR::GetEnvVar (const wxString &aEnvVarName)
 Get an environment variable as a specific type, if set correctly.
 
template<>
KICOMMON_API std::optional< wxString > ENV_VAR::GetEnvVar (const wxString &aEnvVarName)
 Get a string environment variable, if it is set.
 
template<>
KICOMMON_API std::optional< double > ENV_VAR::GetEnvVar (const wxString &aEnvVarName)
 Get a double from an environment variable, if set.
 

Detailed Description

Functions related to environment variables, including help functions.

Definition in file env_vars.h.