Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Friends | List of all members
JFIT::JHistory Struct Reference

Container for historical events. More...

#include <JHistory.hh>

Inheritance diagram for JFIT::JHistory:
std::vector< JEvent > JFIT::JFit

Classes

struct  is_event
 Auxiliary class to test history. More...
 
struct  is_not_event
 Auxiliary class to test history. More...
 

Public Member Functions

 JHistory ()
 Default constructor. More...
 
 JHistory (const JFitApplication_t &type)
 Constructor. More...
 
 JHistory (const JHistory &history, const JFitApplication_t &type)
 Constructor. More...
 
virtual ~JHistory ()
 Virtual destructor. More...
 
const JHistorygetHistory () const
 Get history. More...
 
JHistorygetHistory ()
 Get history. More...
 
JHistoryadd (const JFitApplication_t &type)
 Add event to history. More...
 
 ClassDef (JHistory, 1)
 

Friends

std::ostream & operator<< (std::ostream &out, const JHistory &history)
 Write history to output stream. More...
 

Detailed Description

Container for historical events.

Definition at line 95 of file JHistory.hh.

Constructor & Destructor Documentation

JFIT::JHistory::JHistory ( )
inline

Default constructor.

Definition at line 182 of file JHistory.hh.

182  :
184  {}
JFIT::JHistory::JHistory ( const JFitApplication_t type)
inline

Constructor.

Parameters
typeapplication type

Definition at line 192 of file JHistory.hh.

192  :
194  {
195  add(type);
196  }
JHistory & add(const JFitApplication_t &type)
Add event to history.
Definition: JHistory.hh:248
JFIT::JHistory::JHistory ( const JHistory history,
const JFitApplication_t type 
)
inline

Constructor.

Parameters
historyhistory
typeapplication type

Definition at line 205 of file JHistory.hh.

206  :
207  std::vector<JEvent>(history)
208  {
209  add(type);
210  }
JHistory & add(const JFitApplication_t &type)
Add event to history.
Definition: JHistory.hh:248
virtual JFIT::JHistory::~JHistory ( )
inlinevirtual

Virtual destructor.

Definition at line 216 of file JHistory.hh.

217  {}

Member Function Documentation

const JHistory& JFIT::JHistory::getHistory ( ) const
inline

Get history.

Returns
histtory

Definition at line 225 of file JHistory.hh.

226  {
227  return static_cast<const JHistory&>(*this);
228  }
Container for historical events.
Definition: JHistory.hh:95
JHistory& JFIT::JHistory::getHistory ( )
inline

Get history.

Returns
histtory

Definition at line 236 of file JHistory.hh.

237  {
238  return static_cast<JHistory&>(*this);
239  }
Container for historical events.
Definition: JHistory.hh:95
JHistory& JFIT::JHistory::add ( const JFitApplication_t type)
inline

Add event to history.

Parameters
typeapplication type
Returns
this history

Definition at line 248 of file JHistory.hh.

249  {
250  push_back(JEvent(type, this->size() + 1));
251 
252  return *this;
253  }
Auxiliary class for historical event.
Definition: JHistory.hh:32
JFIT::JHistory::ClassDef ( JHistory  ,
 
)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const JHistory history 
)
friend

Write history to output stream.

Parameters
outoutput stream
historyhistory
Returns
output stream

Definition at line 263 of file JHistory.hh.

264  {
265  using namespace std;
266 
267  for (const_iterator i = history.begin(); i != history.end(); ++i) {
268  out << *i << endl;
269  }
270 
271  return out;
272  }

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