45 #if !defined(NCBI_OS_UNIX) || defined(HAVE_NCBI_C)
46 # if defined(GetProgramName)
47 # undef GetProgramName
49 # define GetProgramName GetProgramName
50 # if defined(SetProgramName)
51 # undef SetProgramName
53 # define SetProgramName SetProgramName
124 void Reset(
const char*
const* envp = 0);
131 const string&
Get(
const string& name,
bool* found =
NULL)
const;
134 void Enumerate(list<string>&
names,
const string& prefix =
kEmptyStr)
140 void Set(
const string& name,
const string&
value);
144 void Unset(
const string& name);
148 virtual string Load(
const string& name,
bool& found)
const;
221 void Clean(
const string& name);
240 const char*
const* argv,
259 const char*
const* argv,
268 const string& operator[] (
SIZE_TYPE pos)
const {
return m_Args[pos]; }
271 void Add(
const string& arg);
CAutoEnvironmentVariable –.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
static const struct name_t names[]
EFollowLinks
Whether to follow symbolic links (also known as shortcuts or aliases)
@ eIgnoreLinks
Do not follow symbolic links.
EErrCode
Error types that arguments processing can generate.
string m_PrevValue
Previous value of the environment variable manipulated.
deque< string > m_Args
Queue of arguments.
string m_ProgramName
Program name if different from the default m_Args[0].
SEnvValue(const string &v, const TXChar *p)
SIZE_TYPE Size(void) const
Get size (number) of arguments.
CFastMutex m_ResolvedNameMutex
bool m_WasSet
Was the variable originally set at all?
NCBI_EXCEPTION_DEFAULT(CArgumentsException, CCoreException)
map< string, SEnvValue > TCache
string m_VariableName
Name of the environment variable manipulated.
AutoPtr< CNcbiEnvironment > m_Env
Affected CNcbiEnvironment instance.
@ eNegativeArgc
Negative argc value.
CException & operator=(const CException &)
Private assignment operator to prohibit assignment.
virtual const char * GetErrCodeString(void) const override
Translate from the error code value to its string representation.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_NS_STD::string::size_type SIZE_TYPE
#define NCBI_XNCBI_EXPORT
const TYPE & Get(const CNamedParameterList *param)
const GenericPointer< typename T::ValueType > T2 value
#define GetProgramName
Avoid name clash with the NCBI C Toolkit.
Multi-threading – mutexes; rw-locks; semaphore.
Cached environment <name,value> pair.