![]() |
Computer Assited Medical Intervention Tool Kit
version 3.3
|
HistoryComponent class describes the component information (name, type) stored in the history. More...
#include <HistoryComponent.h>
Public Types | |
| enum | Type { IMAGE_COMPONENT, MESH_COMPONENT, OTHER } |
| The different Type (of representation) of the associated Component. More... | |
Public Member Functions | |
Constructors | |
| HistoryComponent (Component *component) | |
| Construct a new History component from the input component. More... | |
Accessors | |
| QString | getName () const |
| Get the the name of the Component associated to this item. More... | |
| Type | getType () const |
| Get the Type of the Component associated to this item. More... | |
Private Attributes | |
Private properties | |
| QString | name |
| The name of the Component. More... | |
| Type | type |
| The component's Type. More... | |
HistoryComponent class describes the component information (name, type) stored in the history.
In CamiTK, every Action are stored in a history, which can be saved as a XML file.
Each history entry is an instance of HistoryItem and provides information about the processed action :
History items are mainly useful for getting back to a previous state by undoing an action or for scripting by storing in a file a pipeline of actions written in Python.
The history is stored in the Application class and uses the "construct on first use" idiom/design-pattern (with singletons).
It therefore avoids the infamous "static initialization order fiasco", see http://www.parashift.com/c++-faq/ctors.html
| camitk::HistoryComponent::HistoryComponent | ( | Component * | component | ) |
Construct a new History component from the input component.
| component | The Component associated to the HistoryComponent. |
| QString camitk::HistoryComponent::getName | ( | ) | const |
| Type camitk::HistoryComponent::getType | ( | ) | const |
|
private |
The name of the Component.
|
private |
The component's Type.
Type is a persistent information, stored in the XML.
1.8.8