| LLDB mainline
    | 
#include <SBEnvironment.h>
| Public Member Functions | |
| SBEnvironment () | |
| SBEnvironment (const lldb::SBEnvironment &rhs) | |
| ~SBEnvironment () | |
| const lldb::SBEnvironment & | operator= (const lldb::SBEnvironment &rhs) | 
| const char * | Get (const char *name) | 
| Return the value of a given environment variable. | |
| size_t | GetNumValues () | 
| const char * | GetNameAtIndex (size_t index) | 
| Return the name of the environment variable at a given index from the internal list of environment variables. | |
| const char * | GetValueAtIndex (size_t index) | 
| Return the value of the environment variable at a given index from the internal list of environment variables. | |
| SBStringList | GetEntries () | 
| Return all environment variables contained in this object. | |
| void | PutEntry (const char *name_and_value) | 
| Add or replace an existing environment variable. | |
| void | SetEntries (const SBStringList &entries, bool append) | 
| Update this object with the given environment variables. | |
| bool | Set (const char *name, const char *value, bool overwrite) | 
| Set the value of a given environment variable. | |
| bool | Unset (const char *name) | 
| Unset an environment variable if exists. | |
| void | Clear () | 
| Delete all the environment variables. | |
| Protected Member Functions | |
| SBEnvironment (lldb_private::Environment rhs) | |
| lldb_private::Environment & | ref () const | 
| Private Attributes | |
| std::unique_ptr< lldb_private::Environment > | m_opaque_up | 
| Friends | |
| class | SBPlatform | 
| class | SBTarget | 
| class | SBLaunchInfo | 
Definition at line 16 of file SBEnvironment.h.
| SBEnvironment::SBEnvironment | ( | ) | 
Definition at line 19 of file SBEnvironment.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by operator=(), SBEnvironment(), and SBLaunchInfo.
| SBEnvironment::SBEnvironment | ( | const lldb::SBEnvironment & | rhs | ) | 
Definition at line 23 of file SBEnvironment.cpp.
References lldb_private::clone(), LLDB_INSTRUMENT_VA, m_opaque_up, and SBEnvironment().
| 
 | default | 
References Clear(), Get(), GetEntries(), GetNameAtIndex(), GetNumValues(), GetValueAtIndex(), operator=(), PutEntry(), Set(), SetEntries(), and Unset().
| 
 | protected | 
Definition at line 28 of file SBEnvironment.cpp.
References m_opaque_up.
| void SBEnvironment::Clear | ( | ) | 
Delete all the environment variables.
Definition at line 118 of file SBEnvironment.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by ~SBEnvironment().
| const char * SBEnvironment::Get | ( | const char * | name | ) | 
Return the value of a given environment variable.
| [in] | name | The name of the environment variable. | 
Definition at line 47 of file SBEnvironment.cpp.
References lldb_private::ConstString::AsCString(), LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by ~SBEnvironment().
| SBStringList SBEnvironment::GetEntries | ( | ) | 
Return all environment variables contained in this object.
Each variable is returned as a string with the following format name=value
Definition at line 91 of file SBEnvironment.cpp.
References lldb::SBStringList::AppendString(), lldb_private::Environment::compose(), LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by ~SBEnvironment().
| const char * SBEnvironment::GetNameAtIndex | ( | size_t | index | ) | 
Return the name of the environment variable at a given index from the internal list of environment variables.
| [in] | index | The index of the environment variable in the internal list. | 
Definition at line 57 of file SBEnvironment.cpp.
References lldb_private::ConstString::AsCString(), GetNumValues(), LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by ~SBEnvironment().
| size_t SBEnvironment::GetNumValues | ( | ) | 
Definition at line 41 of file SBEnvironment.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by GetNameAtIndex(), GetValueAtIndex(), and ~SBEnvironment().
| const char * SBEnvironment::GetValueAtIndex | ( | size_t | index | ) | 
Return the value of the environment variable at a given index from the internal list of environment variables.
| [in] | index | The index of the environment variable in the internal list. | 
Definition at line 66 of file SBEnvironment.cpp.
References lldb_private::ConstString::AsCString(), GetNumValues(), LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by ~SBEnvironment().
| const SBEnvironment & SBEnvironment::operator= | ( | const lldb::SBEnvironment & | rhs | ) | 
Definition at line 33 of file SBEnvironment.cpp.
References lldb_private::clone(), LLDB_INSTRUMENT_VA, m_opaque_up, and SBEnvironment().
Referenced by ~SBEnvironment().
| void SBEnvironment::PutEntry | ( | const char * | name_and_value | ) | 
Add or replace an existing environment variable.
The input must be a string with the format name=value
| [in] | name_and_value | The entry to set which conforms to the format mentioned above. | 
Definition at line 101 of file SBEnvironment.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by SetEntries(), and ~SBEnvironment().
| 
 | protected | 
Definition at line 124 of file SBEnvironment.cpp.
References m_opaque_up.
Referenced by SBLaunchInfo, and lldb::SBLaunchInfo::SetEnvironment().
Set the value of a given environment variable.
If the variable exists, its value is updated only if overwrite is true.
| [in] | name | The name of the environment variable to set. | 
| [in] | value | The value of the environment variable to set. | 
| [in] | overwrite | Flag that indicates whether to overwrite an existing environment variable. | 
Definition at line 75 of file SBEnvironment.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by ~SBEnvironment().
| void SBEnvironment::SetEntries | ( | const SBStringList & | entries, | 
| bool | append ) | 
Update this object with the given environment variables.
The input is a list of entries with the same format required by SBEnvironment::PutEntry.
If append is false, the provided environment will replace the existing environment. Otherwise, existing values will be updated of left untouched accordingly.
| [in] | entries | The environment variable entries. | 
| [in] | append | Flag that controls whether to replace the existing environment. | 
Definition at line 108 of file SBEnvironment.cpp.
References lldb::SBStringList::GetSize(), lldb::SBStringList::GetStringAtIndex(), LLDB_INSTRUMENT_VA, m_opaque_up, and PutEntry().
Referenced by ~SBEnvironment().
| bool SBEnvironment::Unset | ( | const char * | name | ) | 
Unset an environment variable if exists.
| [in] | name | The name of the environment variable to unset. | 
Definition at line 85 of file SBEnvironment.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_up.
Referenced by ~SBEnvironment().
| 
 | friend | 
Definition at line 125 of file SBEnvironment.h.
References ref(), SBEnvironment(), and SBLaunchInfo.
Referenced by SBLaunchInfo.
| 
 | friend | 
| 
 | friend | 
| 
 | private | 
Definition at line 132 of file SBEnvironment.h.
Referenced by Clear(), Get(), GetEntries(), GetNameAtIndex(), GetNumValues(), GetValueAtIndex(), operator=(), PutEntry(), ref(), SBEnvironment(), SBEnvironment(), SBEnvironment(), Set(), SetEntries(), and Unset().