# Coriolis Core (CRL) Documentation

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

## ◆ Catalog()

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

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

## ◆ ~Catalog()

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

Free a Catalog object.

## Member Function Documentation

## ◆ getState()

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.

## ◆ mergeState()

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.

## ◆ deleteState()

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

Returns: true if an entry has been indeed deleted.

Delete the State associated with Cell `name`.

## ◆ clear()

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

Completly empty the Catalog.

## ◆ loadFromFile()

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.

## ◆ getStates()

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.14 on Mon Apr 27 2020 | Return to top of page

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