CoreLinux++  0.4.32
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
corelinux::Environment Class Reference

Environment is a class utility which encapsulates. More...

#include <Environment.hpp>

Public Member Functions

bool operator== (EnvironmentCref) const
 Equality operator.
 

Static Public Member Functions

static UserIdentifier getUserId (void)
 Retreive the real user id for the current process.
 
static UserIdentifier getEffectiveUserId (void)
 Retreive the effective user id for the current process.
 
static GroupIdentifier getGroupId (void)
 Retreive the real group id for the current process.
 
static GroupIdentifier getEffectiveGroupId (void)
 Retreive the effective group id for the current process.
 
static CharPtr getEnvironmentValue (CharCptr)
 Retrieve the environmental value variable from the (name=value) pair. More...
 
static Int setEnvironmentNameValue (CharPtr)
 Sets an environment name=value. More...
 
static Int setupCommonAccess (CharCptr, const CreateDisposition &)
 Basically, creates a filename for use by those Linux system api that require a key (IPC mainly). More...
 
static Int removeCommonAccess (CharCptr)
 The reverse of setupCommonAccess. More...
 
static ProcessIdentifier getProcessGroupId (void)
 Retrieve the process group id for the current process.
 
static ProcessIdentifier getProcessGroupId (ProcessIdentifierRef)
 Retrieve the process group id for a specific process.
 
static void setThreadPriority (ProcessIdentifier, Int)
 set priority for a specific process
 
static Int getThreadPriority (ProcessIdentifier)
 get priority for a specific process
 

Protected Member Functions

 Environment (EnvironmentCref) throw (Assertion)
 
EnvironmentRef operator= (EnvironmentCref) throw (Assertion)
 

Detailed Description

Environment is a class utility which encapsulates.

Member Function Documentation

§ getEnvironmentValue()

CharPtr corelinux::Environment::getEnvironmentValue ( CharCptr  aName)
static

Retrieve the environmental value variable from the (name=value) pair.

Same behavior as in POSIX getenv

Parameters
Charconst pointer to key (name) to find value for
Returns
Char pointer to the value or null if not found

Referenced by operator==().

§ removeCommonAccess()

Int corelinux::Environment::removeCommonAccess ( CharCptr  aName)
static

The reverse of setupCommonAccess.

Parameters
Charpointer to fully qualified name
Returns
Int indicating failure (-1)

Referenced by corelinux::Memory::destroyStorage(), operator==(), corelinux::SemaphoreGroup::SemaphoreGroup(), corelinux::Memory::~Memory(), and corelinux::SemaphoreGroup::~SemaphoreGroup().

§ setEnvironmentNameValue()

Int corelinux::Environment::setEnvironmentNameValue ( CharPtr  aNameValue)
static

Sets an environment name=value.

Same behavior and return as POSIX putenv.

Parameters
Charpointer to string with "NAME=VALUE"
Returns
Int 0 for success, -1 otherwise

References setupCommonAccess().

Referenced by operator==().

§ setupCommonAccess()

Int corelinux::Environment::setupCommonAccess ( CharCptr  aName,
const CreateDisposition aMode 
)
static

Basically, creates a filename for use by those Linux system api that require a key (IPC mainly).

Parameters
Charpointer to fully qualified name
CreateDispositiondisposition of object
Returns
Int indicating failure (-1)

References corelinux::FAIL_IF_EXISTS, corelinux::FAIL_IF_NOTEXISTS, corelinux::GROUP_ALL, corelinux::OWNER_ALL, and corelinux::PUBLIC_ALL.

Referenced by corelinux::Memory::createStorage(), operator==(), corelinux::SemaphoreGroup::SemaphoreGroup(), and setEnvironmentNameValue().


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

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium