Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | List of all members
camitk::HistoryComponent Class Reference

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...
 

Detailed Description

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

See also
HistoryItem

Constructor & Destructor Documentation

camitk::HistoryComponent::HistoryComponent ( Component component)

Construct a new History component from the input component.

Parameters
componentThe Component associated to the HistoryComponent.

Member Function Documentation

QString camitk::HistoryComponent::getName ( ) const

Get the the name of the Component associated to this item.

Returns
the name of the associated Component.
Type camitk::HistoryComponent::getType ( ) const

Get the Type of the Component associated to this item.

Returns
the Type of the associated Component.

Member Data Documentation

QString camitk::HistoryComponent::name
private

The name of the Component.

Type camitk::HistoryComponent::type
private

The component's Type.

Type is a persistent information, stored in the XML.


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