# Hurricane VLSI Database

List of all members | Public Member Functions
Hurricane::Warning Class Reference

Warning description (API) More...

Inheritance diagram for Hurricane::Warning:
[legend]

## Public Member Functions
| Warning (const string &reason)
| Warning (const char *format,...)
| Warning (int code, const string &reason)
| Warning (int code, const char *format,...)
| Warning (const Warning &warning)
Warning & | operator= (const Warning &warning)
string | getReason () const
int | getCode () const
Public Member Functions inherited from Hurricane::Exception
string | what () const
string | textWhat () const
string | htmlWhat () const

## Additional Inherited Members
Static Public Member Functions inherited from Hurricane::Exception
static void | setTextTranslator (const TextTranslator &translator)
static void | setHtmlTranslator (const TextTranslator &translator)

## Detailed Description

Warning description (API)

# Introduction

There is no difference with the Error type but the printed message is prefixed by WARNING instead of ERROR.

# Nouveaux types

type: Warning::Inherit -> Exception Useful for calling the base class methods without knowing this class.

# Remark

You can also use this object to print messages without throwing an exception as shown below :

Cell* cell = library->getCell("adder"); // we get the cell
if (!cell)
cerr << Warning("Unknown cell adder").what() << endl;
else {
// we know what to do here
}

The same remark applies to all exception types.

## Constructor & Destructor Documentation

## ◆ Warning() [1/5]

Hurricane::Warning::Warning | ( | const string & | reason | ) |

Builds a warning characterized by a reason (code defaults to zero).

## ◆ Warning() [2/5]

Hurricane::Warning::Warning | ( | const char * | format,
|  |  | ...
| ) |  |

Builds a warning characterized by a reason, using the `vararg` protocol and `printf` format (code defaults to zero).

## ◆ Warning() [3/5]

Hurricane::Warning::Warning | ( | int | code,
|  | const string & | reason
| ) |  |

Builds a warning characterized by a reason and a code useful within a switch.

## ◆ Warning() [4/5]

Hurricane::Warning::Warning | ( | int | code,
|  | const char * | format,
|  |  | ...
| ) |  |

Builds a warning characterized by a reason and a code useful within a switch. The reason is supplied in a `printf` like fashion.

## ◆ Warning() [5/5]

Hurricane::Warning::Warning | ( | const Warning & | warning | ) |

Copy constructor.

## Member Function Documentation

## ◆ operator=()

Warning & Hurricane::Warning::operator= | ( | const Warning & | warning | ) |

Assignment operator.

## ◆ getReason()

string Hurricane::Warning::getReason | ( |  | ) | const
| inline

Returns: the reason for which the warning was thrown.

## ◆ getCode()

int Hurricane::Warning::getCode | ( |  | ) | const
| inline

Returns: the warning code number.

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

- Warning.h
- Warning.dox

Generated by doxygen 1.8.14 on Tue Jul 21 2020 | Return to top of page

Hurricane VLSI Database | Copyright © 2000-2016 Bull S.A. All rights reserved