Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members  

nFANTOM100::tStatus Class Reference

Class that contains a status code and the file name and line number where that status code was generated. More...

#include <tStatus.h>

List of all members.

Public Methods

 tStatus (void)
 constructor. More...

 tStatus (const tStatus &status)
 copy constructor. More...

 tStatus (ViStatus code, const char *fileName, ViUInt32 lineNumber)
 constructor with code, filename, and line number. More...

 ~tStatus ()
 destructor.

ViStatus getCode (void) const
 Returns the status code for this status object. More...

const char * getFileName (void) const
 Returns the file name in which the status code, for this status object, was generated. More...

ViUInt32 getLineNumber (void) const
 Returns the line number at which the status code, for this status object, was. More...

void setCode (ViStatus code, const char *fileName, ViUInt32 lineNumber)
 Sets the status code, file name, and line number for this status object, if. More...

void assign (const tStatus &status)
 Assigns the specified status object to this status object, if appropriate. More...

void clear (void)
 Clears the status code for this status object. More...

bool isFatal (void) const
 Returns true if this status object contains a status code that is fatal. More...

bool isNotFatal (void) const
 Returns true if this status object contains a status code that is not fatal. More...

bool isWarning (void) const
 Returns true if this status object contains a status code that is a warning. More...

bool isSuccess (void) const
 Returns true if this status object contains the status code for success. More...


Private Types

enum  { kMaxFileNameLength = 101 }

Private Methods

tStatus & operator= (const tStatus &rhs)

Private Attributes

ViStatus _code
ViChar _fileName [kMaxFileNameLength]
ViUInt32 _lineNumber


Detailed Description

Class that contains a status code and the file name and line number where that status code was generated.


Constructor & Destructor Documentation

nFANTOM100::tStatus::tStatus void    [inline]
 

constructor.

Creates a tStatus object intialized to success.

Postcondition:
The status code is set to VI_SUCCESS.

nFANTOM100::tStatus::tStatus const tStatus &    status [inline]
 

copy constructor.

Copies the code, line number, and file name from the specified tStatus object.

Parameters:
status  The status object to copy.

nFANTOM100::tStatus::tStatus ViStatus    code,
const char *    fileName,
ViUInt32    lineNumber
[inline]
 

constructor with code, filename, and line number.

Creates a tStatus object initialized to the specified code, file name, and line number. Note that the nFANTOM_mLocation macro can be used to pass the fileName and lineNumber parameters.

Parameters:
code  A status code.
fileName  The name of the file in which the status code was generated.
lineNumber  The line number in the file at which the status code was generated.


Member Function Documentation

void nFANTOM100::tStatus::assign const tStatus &    status [inline]
 

Assigns the specified status object to this status object, if appropriate.

Stores the status code, file name, and line number of the specified status object in this status object if this status object contains a successful status code or if this status object contains a warning status code and the status code of the speciied status object is fatal. A fatal status code is denoted by a negative value. A successful status code is denoted by VI_SUCCESS.

Parameters:
status  The status object to assign.

void nFANTOM100::tStatus::clear void    [inline]
 

Clears the status code for this status object.

Postcondition:
status The code is set to VI_SUCCESS.

ViStatus nFANTOM100::tStatus::getCode void    const [inline]
 

Returns the status code for this status object.

Returns:
The status code for this status object.

const char* nFANTOM100::tStatus::getFileName void    const [inline]
 

Returns the file name in which the status code, for this status object, was generated.

Returns:
The file name in which the status code, for this status object, was generated.

ViUInt32 nFANTOM100::tStatus::getLineNumber void    const [inline]
 

Returns the line number at which the status code, for this status object, was.

Returns:
The line number at which the status code, for this status object, was generated.

bool nFANTOM100::tStatus::isFatal void    const [inline]
 

Returns true if this status object contains a status code that is fatal.

A status code with a negative value is considered fatal.

Returns:
true if this status object contains a status code that is fatal; false otherwise.

bool nFANTOM100::tStatus::isNotFatal void    const [inline]
 

Returns true if this status object contains a status code that is not fatal.

Any status code with a non-negative (including zero) value is considered non-fatal.

Returns:
true if this status object contains a non-fatal status code; false otherwise.

bool nFANTOM100::tStatus::isSuccess void    const [inline]
 

Returns true if this status object contains the status code for success.

A value of VI_SUCCESS represents success.

Returns:
true if this status object contains the status code for success; false otherwise.

bool nFANTOM100::tStatus::isWarning void    const [inline]
 

Returns true if this status object contains a status code that is a warning.

A status code with a non-zero, positive value is considered a warning.

Returns:
true if this status object contains a status code that is a warning; false otherwise.

void nFANTOM100::tStatus::setCode ViStatus    code,
const char *    fileName,
ViUInt32    lineNumber
[inline]
 

Sets the status code, file name, and line number for this status object, if.

Stores the specified status code, file name, and line number in this status object if this status object contains a successful status code or if this status object contains a warning status code and the specified status code is fatal. A fatal status code is denoted by a negative value. A successful status code is denoted by VI_SUCCESS.

Parameters:
code  A status code.
fileName  The name of the file in which the status code was generated.
lineNumber  The line number in the file at which the status code was generated.


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

© Copyright 2005-2006, National Instruments Corporation. All rights reserved.