Audacity 3.2.0
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
EnvSetter Struct Referencefinal

Public Member Functions

 EnvSetter (bool fromUserPathOnly)
 
 ~EnvSetter ()
 

Public Attributes

wxString OldValue
 
bool ValueExisted
 

Static Public Attributes

static const wxString VariableName
 
static const wxString Separator
 

Detailed Description

Definition at line 81 of file FFmpegFunctions.cpp.

Constructor & Destructor Documentation

◆ EnvSetter()

EnvSetter::EnvSetter ( bool  fromUserPathOnly)
inlineexplicit

Definition at line 86 of file FFmpegFunctions.cpp.

87 {
89
90 wxString value;
91
92 for (const wxString& path : FFmpegFunctions::GetSearchPaths(fromUserPathOnly))
93 {
94 if (!value.empty())
95 value += Separator;
96
97 value += path;
98 }
99
100 wxSetEnv(VariableName, value);
101 };
static const wxString Separator
static const wxString VariableName
wxString OldValue
static std::vector< wxString > GetSearchPaths(bool fromUserPathOnly)

References FFmpegFunctions::GetSearchPaths(), OldValue, Separator, ValueExisted, and VariableName.

Here is the call graph for this function:

◆ ~EnvSetter()

EnvSetter::~EnvSetter ( )
inline

Definition at line 103 of file FFmpegFunctions.cpp.

104 {
105 if (ValueExisted)
106 wxSetEnv(VariableName, OldValue);
107 else
108 wxUnsetEnv(VariableName);
109 }

References OldValue, ValueExisted, and VariableName.

Member Data Documentation

◆ OldValue

wxString EnvSetter::OldValue

Definition at line 111 of file FFmpegFunctions.cpp.

Referenced by EnvSetter(), and ~EnvSetter().

◆ Separator

const wxString EnvSetter::Separator
static

Definition at line 84 of file FFmpegFunctions.cpp.

Referenced by EnvSetter().

◆ ValueExisted

bool EnvSetter::ValueExisted

Definition at line 112 of file FFmpegFunctions.cpp.

Referenced by EnvSetter(), and ~EnvSetter().

◆ VariableName

const wxString EnvSetter::VariableName
static

Definition at line 83 of file FFmpegFunctions.cpp.

Referenced by EnvSetter(), and ~EnvSetter().


The documentation for this struct was generated from the following file: