Reference

corelinux_Assertion(3)

Assertion is-a Exception created when an assertion fails.

NAME

corelinux::Assertion - Assertion is-a Exception created when an assertion fails.

SYNOPSIS

#include <Assertion.hpp>

Inherits corelinux::Exception.

Public Types

enum Type { REQUIRE, ENSURE, CHECK, ASSERT, NEVERGETHERE }
Assertion Types enum.

Public Member Functions

Assertion (Type aType, CharPtr aReason, CharPtr aFile, LineNum aLine)
Assertion Constructor. Assertion (AssertionCref rExcept)
Assertion copy constructor. virtual ~Assertion (void)
Virtual Destructor. AssertionRef operator= (AssertionCref)
Assignment operator overload. bool operator== (AssertionCref)
Comparisson operator overload. Assertion::Type getType (void) const
Accessor.

Detailed Description

Assertion is-a Exception created when an assertion fails.

It contains type information so that clients may filter the types of assertion violations that they catch. There are several types of assertion macros defined. Refer to the comments at the top of Assertion.hpp for details.

Member Enumeration Documentation

enum corelinux::Assertion::Type

Assertion Types enum.

Enumeration values:

ENSURE

REQUIRE pre-condition state.

CHECK

ENSURE post-condition state.

ASSERT

CHECK invariant state.

NEVERGETHERE

NEVERGETHERE logic state.

Constructor & Destructor Documentation

corelinux::Assertion::Assertion (Type aType, CharPtr aReason, CharPtr aFile, LineNum aLine)

Assertion Constructor. Parameters:

Type Specifies the state condition for the assertion
Reason Text describing the assertion
File The source module the assertion was thrown from
Line The throw point line in the source module

corelinux::Assertion::Assertion (AssertionCref rExcept)

Assertion copy constructor. Parameters:

Assertion const reference

Member Function Documentation

Assertion::Type corelinux::Assertion::getType (void) const

Accessor. Returns:

The Type which caused the assertion

AssertionRef corelinux::Assertion::operator= (AssertionCref)

Assignment operator overload. Parameters:

Assertion const reference

Returns:

Assertion reference to self

bool corelinux::Assertion::operator== (AssertionCref)

Comparisson operator overload. Parameters:

Assertion const reference

Returns:

true if equal, false otherwise

Author

Generated automatically by Doxygen for CoreLinux++ from the source code.

History