Commit b19bbe83 authored by fogal1's avatar fogal1

Add modification comments.

Forgot / messed up initially.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@7148 18c085ea-50e0-402c-830e-de6fd14e8384
parent 5a4fa584
......@@ -56,8 +56,16 @@
namespace Environment {
/// Obtains a value from the environment.
/// `getenv' appears to be pretty standard; we don't do anything special here.
// ****************************************************************************
// Function: Environment::get
//
// Purpose: Obtains a value from the environment.
// `getenv' appears to be pretty standard; we don't do anything
// special here.
//
// Programmer: Tom Fogal
//
// ****************************************************************************
std::string
get(const char *variable)
{
......@@ -65,7 +73,14 @@ get(const char *variable)
return std::string(value);
}
/// Predicate to determine whether a variable is defined.
// ****************************************************************************
// Function: Environment::get
//
// Purpose: Predicate to determine whether a variable is defined.
//
// Programmer: Tom Fogal
//
// ****************************************************************************
bool
exists(const char *variable)
{
......@@ -77,8 +92,20 @@ exists(const char *variable)
return true;
}
/// Sets a value in the enviroment. Avoid using putenv, since it requires
/// static memory.
// ****************************************************************************
// Function: Environment::set
//
// Purpose: Sets a value in the enviroment. Avoid using putenv, since it
// requires static memory.
//
// Programmer: Tom Fogal
//
// Modifications:
//
// Tom Fogal, Thu Apr 30 12:08:07 MDT 2009
// Do the right thing on Windows (untested..)
//
// ****************************************************************************
void
set(const char *k, const char *v)
{
......@@ -97,8 +124,14 @@ set(const char *k, const char *v)
}
}
/// Removes a variable definition. Implementations appear to differ a bit
/// between platforms.
// ****************************************************************************
// Function: Environment::unset
//
// Purpose: Removes a variable definition from the environment.
//
// Programmer: Tom Fogal
//
// ****************************************************************************
void
unset(const char *variable)
{
......@@ -121,4 +154,4 @@ unset(const char *variable)
#endif
}
}; /* namespace Env */
}; /* namespace Environment */
......@@ -45,17 +45,47 @@
#include <string>
namespace Environment {
/// Obtains a value from the environment.
namespace Environment
{
// ****************************************************************************
// Function: Environment::get
//
// Purpose: Obtains a value from the environment.
//
// Programmer: Tom Fogal
//
// ****************************************************************************
std::string MISC_API get(const char *);
/// Predicate to determine whether a variable is defined.
// ****************************************************************************
// Function: Environment::get
//
// Purpose: Predicate to determine whether a variable is defined.
//
// Programmer: Tom Fogal
//
// ****************************************************************************
bool MISC_API exists(const char *);
/// Sets a value in the enviroment. Overwrites any existing value.
// ****************************************************************************
// Function: Environment::set
//
// Purpose: Sets a value in the enviroment. Avoid using putenv, since it
// requires static memory.
//
// Programmer: Tom Fogal
//
// ****************************************************************************
void MISC_API set(const char *k, const char *v);
/// Removes the given key from the environment.
// ****************************************************************************
// Function: Environment::unset
//
// Purpose: Removes a variable definition from the environment.
//
// Programmer: Tom Fogal
//
// ****************************************************************************
void MISC_API unset(const char *);
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment