Open CASCADE Technology  7.5.0
Public Member Functions
OSD_Environment Class Reference

Management of system environment variables An environment variable is composed of a variable name and its value. More...

#include <OSD_Environment.hxx>

Public Member Functions

 OSD_Environment ()
 Creates the object Environment. More...
 
 OSD_Environment (const TCollection_AsciiString &Name)
 Creates an Environment variable initialized with value set to an empty AsciiString. More...
 
 OSD_Environment (const TCollection_AsciiString &Name, const TCollection_AsciiString &Value)
 Creates an Environment variable initialized with Value. More...
 
void SetValue (const TCollection_AsciiString &Value)
 Changes environment variable value. Raises ConstructionError either if the string contains characters not in range of ' '...'~' or if the string contains the character '$' which is forbiden. More...
 
TCollection_AsciiString Value ()
 Gets the value of an environment variable. More...
 
void SetName (const TCollection_AsciiString &name)
 Changes environment variable name. Raises ConstructionError either if the string contains characters not in range of ' '...'~' or if the string contains the character '$' which is forbiden. More...
 
TCollection_AsciiString Name () const
 Gets the name of <me>. More...
 
void Build ()
 Sets the value of an environment variable into system (physically). More...
 
void Remove ()
 Removes (physically) an environment variable. More...
 
Standard_Boolean Failed () const
 Returns TRUE if an error occurs. More...
 
void Reset ()
 Resets error counter to zero. More...
 
void Perror ()
 Raises OSD_Error. More...
 
Standard_Integer Error () const
 Returns error number if 'Failed' is TRUE. More...
 

Detailed Description

Management of system environment variables An environment variable is composed of a variable name and its value.

To be portable among various systems, environment variables are local to a process.

Constructor & Destructor Documentation

◆ OSD_Environment() [1/3]

OSD_Environment::OSD_Environment ( )

Creates the object Environment.

◆ OSD_Environment() [2/3]

OSD_Environment::OSD_Environment ( const TCollection_AsciiString Name)

Creates an Environment variable initialized with value set to an empty AsciiString.

◆ OSD_Environment() [3/3]

OSD_Environment::OSD_Environment ( const TCollection_AsciiString Name,
const TCollection_AsciiString Value 
)

Creates an Environment variable initialized with Value.

Member Function Documentation

◆ Build()

void OSD_Environment::Build ( )

Sets the value of an environment variable into system (physically).

◆ Error()

Standard_Integer OSD_Environment::Error ( ) const

Returns error number if 'Failed' is TRUE.

◆ Failed()

Standard_Boolean OSD_Environment::Failed ( ) const

Returns TRUE if an error occurs.

◆ Name()

TCollection_AsciiString OSD_Environment::Name ( ) const

Gets the name of <me>.

◆ Perror()

void OSD_Environment::Perror ( )

Raises OSD_Error.

◆ Remove()

void OSD_Environment::Remove ( )

Removes (physically) an environment variable.

◆ Reset()

void OSD_Environment::Reset ( )

Resets error counter to zero.

◆ SetName()

void OSD_Environment::SetName ( const TCollection_AsciiString name)

Changes environment variable name. Raises ConstructionError either if the string contains characters not in range of ' '...'~' or if the string contains the character '$' which is forbiden.

◆ SetValue()

void OSD_Environment::SetValue ( const TCollection_AsciiString Value)

Changes environment variable value. Raises ConstructionError either if the string contains characters not in range of ' '...'~' or if the string contains the character '$' which is forbiden.

◆ Value()

TCollection_AsciiString OSD_Environment::Value ( )

Gets the value of an environment variable.


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