# Coriolis Core (CRL) Documentation

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | List of all members
CRL::Catalog Class Reference

A Registry to store Alliance Cell metadatas. More...

## Classes
class | State
| An entry to store the Cell State in the Catalog. More...

## Public Member Functions
| Catalog ()
| ~Catalog ()
State * | getState (const Name &name, bool add=false)
void | mergeState (const Name &name, const State &other)
bool | deleteState (const Name &name)
void | clear ()
bool | loadFromFile (const string &path, Library *library)
map< Name, State * > * | getStates ()

## Detailed Description

A Registry to store Alliance Cell metadatas.

The Catalog is built from the various CATAL files from the library directories and enriched with the current state of Cell in the database.

## Constructor & Destructor Documentation

CRL::Catalog::Catalog | ( |  | ) |
| inline

A new, empty, Catalog. Normally, there should only be one Catalog, attribute of AllianceFramework.

CRL::Catalog::~Catalog | ( |  | ) |

Free a Catalog object.

## Member Function Documentation

State * CRL::Catalog::getState | ( | const Name & | name,
|  | bool | add = `false`
| ) |  |

Returns: the State of the Cell named `name`. If `add` is set to true and the cell doesn't exist, an entry is created for it. Otherwise, NULL is returned.

void CRL::Catalog::mergeState | ( | const Name & | name,
|  | const State & | other
| ) |  |

Merge the State `other` with the current one. It only fills the holes. If the State's Cell or Library is already sets, the ones from `other` are discarteds. Related to the Alliance search path policy where the first Cell found shadows any other one found later.

bool CRL::Catalog::deleteState | ( | const Name & | name | ) |

Returns: true if an entry has been indeed deleted.

Delete the State associated with Cell `name`.

void CRL::Catalog::clear | ( |  | ) |

Completly empty the Catalog.

bool CRL::Catalog::loadFromFile | ( | const string & | path,
|  | Library * | library
| ) |  |

Parameters

  path | The path to the library catalog file.
  library | The library for which we are loading a catalog. Returns: true if the catalog file has been found and successfully loaded.

std::map< Hurricane::Name, State * > * CRL::Catalog::getStates | ( |  | ) |
| inline

Returns
  the internal std::map<> of States.

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

- Catalog.h
- Catalog.dox

Generated by doxygen 1.8.5 on Thu Mar 19 2020 | Return to top of page

Coriolis Core (CRL) | Copyright © 2008-2016 UPMC All rights reserved