arm4::ArmInterface Class Reference

The root of the inheritance hierarchy for almost all ARM interfaces. More...

Inheritance diagram for arm4::ArmInterface:
arm4::ArmApplication arm4::ArmBlockCause arm4::ArmCorrelator arm4::ArmDefinition arm4::ArmIdentityProperties arm4::ArmMessageEvent arm4::ArmMessageEventGroup arm4::ArmMetric arm4::ArmMetricDefinition arm4::ArmMetricGroup arm4::ArmMetricGroupDefinition arm4::ArmSystemAddress arm4::ArmTimestamp arm4::ArmTranReport arm4::ArmTransaction arm4::ArmUser arm4::util::ArmDLLLoader

List of all members.

Public Member Functions

int32_t getErrorCode () const
 gets the last error code from this object.
int32_t setErrorCode (int32_t errorCode)
 sets the error code of this object.
std::string getErrorMessage (int32_t errorCode) const
 gets a string describing the passed error code.

Static Public Member Functions

static bool isARMEnabled ()
 Returns whether ARM is enabled (loaded) or not.

Detailed Description

The root of the inheritance hierarchy for almost all ARM interfaces.

It provides a common way to handle errors. If a method invocation on any ARM object causes an error, the error code returned by the object's getErrorCode() will be negative. If no error occurs, the error code is zero. Several methods also return the error code as an int32_t return value.

The error code may change any time a method of the object is executed. Executing a method overrides the previous error code value. The only methods that will never change the error code are getErrorCode() and getErrorMessage(). If multiple threads are processing the same object simultaneously, the results are unpredictable. An error code set as a result of an operation in method X could be replaced by an operation in method Y before thread X executes getErrorCode().

The error code can also be set with setErrorCode(). This is a way for the application to reset or change the error code.

For any non-zero error code returned by an object, the application can request from the same object a string message describing the error using getErrorMessage(). If the object does not support the function or does not recognize the error code, it returns NullString.

Author:
ARM Working Group of The Open Group, MyARM GmbH

Member Function Documentation

int32_t arm4::ArmInterface::getErrorCode (  )  const

gets the last error code from this object.

Returns:
last error code set for this object as a negative value. Zero, if no error code is set.
std::string arm4::ArmInterface::getErrorMessage ( int32_t  errorCode  )  const

gets a string describing the passed error code.

Parameters:
errorCode an error code retrieved from this object.
Returns:
a string describing the error for errorCode, or NullString.
static bool arm4::ArmInterface::isARMEnabled (  )  [static]

Returns whether ARM is enabled (loaded) or not.

Returns:
true if ARM is enabled; otherwise false.
int32_t arm4::ArmInterface::setErrorCode ( int32_t  errorCode  ) 

sets the error code of this object.

Parameters:
errorCode the error code to be set for this object.
Returns:
the error code provided in errorCode.

The documentation for this class was generated from the following file:
  • Arm4/ArmInterface