# Hurricane VLSI Database

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

Tabulation description (API) More...

## Public Member Functions
| Tabulation (const string &s=" ")
| Tabulation (const Tabulation &tabulation)
| ~Tabulation ()
Tabulation & | operator= (const Tabulation &tabulation)
Tabulation & | operator++ ()
Tabulation | operator++ (int)
Tabulation & | operator-- ()
Tabulation | operator-- (int)

## Detailed Description

Tabulation description (API)

# Introduction

This object provides an indentation capability for printing readable texts.

# New global variable

Tabulation tab(" ");

Represents the global tabulation variable usable by all application programmers. The elementary tabulation being fixed to 3 space characters.

# Usage

Let us write a sample code of printing a succinct cell description :

void Describe(Cell* cell)
// **********************
{
cout << tab++ << "cell : " << cellGetName() << endl;
if (!cellGetInstances().IsEmpty()) {
cout << tab++ << "instances : {" << endl;
for_each_instance(instance, cellGetInstances()) {
cout << tab << "instance : " << instanceGetName() << endl;
end_for;
}
cout << --tab << "}";
}
if (!cellGetNets().IsEmpty()) {
cout << tab++ << "nets : {" << endl;
for_each_net(net, cellGetNets()) {
cout << tab++ << "net : " << netGetName() << endl;
if (!netGetPlugs().IsEmpty()) {
cout << tab++ << "plugs : {" << endl;
for_each_plug(plug, netGetPlugs()) {
cout << tab << "master_net : "
<< plugGetMasterNet()GetName() << endl;
end_for;
}
cout << --tab << "}";
}
end_for;
}
cout << --tab << "}";
}
--tab;
}

The call :

Describe(cell);

Will print the result in the following form :

cell : ...
instances : {
instance : ...
instance : ...
...
}
nets : {
net : ...
plugs : {
master_net : ...
master_net : ...
...
}
net : ...
plugs : {
master_net : ...
master_net : ...
...
}
...
}

# Remark

Of course this automatic indentation works also in recursive mode. Its main interest is for that purpose because you don't need to transfer through recursive function calls an additional argument for controling the indentation when formating print-outs.

## Constructor & Destructor Documentation

## ◆ Tabulation() [1/2]

Hurricane::Tabulation::Tabulation | ( | const string & | s = `" "` | ) |

Default constructor : The string `<s>` represents the elementary tabulation (fixed by default to 3 space characters)

## ◆ Tabulation() [2/2]

Hurricane::Tabulation::Tabulation | ( | const Tabulation & | tabulation | ) |

Copy constructor.

## ◆ ~Tabulation()

Hurricane::Tabulation::~Tabulation | ( |  | ) |

No description.

## Member Function Documentation

## ◆ operator=()

Tabulation & Hurricane::Tabulation::operator= | ( | const Tabulation & | tabulation | ) |

Assignment operator.

## ◆ operator++() [1/2]

Tabulation & Hurricane::Tabulation::operator++ | ( |  | ) |

Incrementation operator : returns the tabulation augmented of an elementary tabulation.

## ◆ operator++() [2/2]

Tabulation Hurricane::Tabulation::operator++ | ( | int |  | ) |

Postfixed version of the incrementation operator : the tabulation is augmented of an elementary tabulation, but returns the previous tabulation.

## ◆ operator--() [1/2]

Tabulation & Hurricane::Tabulation::operator-- | ( |  | ) |

Decrementation operator : returns the tabulation reduced of an elementary tabulation.

## ◆ operator--() [2/2]

Tabulation Hurricane::Tabulation::operator-- | ( | int |  | ) |

Postfixed version of the decrementation operator : the tabulation is reduced of an elementary tabulation, but returns the previous tabulation.

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

- Tabulation.h
- Tabulation.dox

Generated by doxygen 1.8.14 on Sun Mar 8 2020 | Return to top of page

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