arm4::QArmInterface Class Reference

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

Inheritance diagram for arm4::QArmInterface:
arm4::QArmApplication arm4::QArmBlockCause arm4::QArmCorrelator arm4::QArmDefinition arm4::QArmIdentityProperties arm4::QArmMessageEvent arm4::QArmMessageEventGroup arm4::QArmMetric arm4::QArmMetricDefinition arm4::QArmMetricGroup arm4::QArmMetricGroupDefinition arm4::QArmSystemAddress arm4::QArmTimestamp arm4::QArmTranReport arm4::QArmTransaction arm4::QArmUser arm4::util::QArmDLLLoader

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.
QString 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::QArmInterface::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.
QString arm4::QArmInterface::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::QArmInterface::isARMEnabled (  )  [static]

Returns whether ARM is enabled (loaded) or not.

Returns:
true if ARM is enabled; otherwise false.
int32_t arm4::QArmInterface::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:
  • QArm4/QArmInterface