Jpp - the software that should make you happy
 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 int type)
 Constructor. More...
 
 JHistory (const JHistory &history, const int type)
 Constructor. More...
 
virtual ~JHistory ()
 Virtual destructor. More...
 
const JHistory & getHistory () const
 Get history. More...
 
JHistory & getHistory ()
 Get history. More...
 
JHistory & add (const int 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 98 of file JHistory.hh.

Constructor & Destructor Documentation

JFIT::JHistory::JHistory ( )
inline

Default constructor.

Definition at line 185 of file JHistory.hh.

185  :
187  {}
JFIT::JHistory::JHistory ( const int  type)
inline

Constructor.

Parameters
typeapplication type

Definition at line 195 of file JHistory.hh.

195  :
197  {
198  add(type);
199  }
JHistory & add(const int type)
Add event to history.
Definition: JHistory.hh:251
JFIT::JHistory::JHistory ( const JHistory &  history,
const int  type 
)
inline

Constructor.

Parameters
historyhistory
typeapplication type

Definition at line 208 of file JHistory.hh.

209  :
210  std::vector<JEvent>(history)
211  {
212  add(type);
213  }
JHistory & add(const int type)
Add event to history.
Definition: JHistory.hh:251
virtual JFIT::JHistory::~JHistory ( )
inlinevirtual

Virtual destructor.

Definition at line 219 of file JHistory.hh.

220  {}

Member Function Documentation

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

Get history.

Returns
histtory

Definition at line 228 of file JHistory.hh.

229  {
230  return static_cast<const JHistory&>(*this);
231  }
Container for historical events.
Definition: JHistory.hh:98
JHistory& JFIT::JHistory::getHistory ( )
inline

Get history.

Returns
histtory

Definition at line 239 of file JHistory.hh.

240  {
241  return static_cast<JHistory&>(*this);
242  }
Container for historical events.
Definition: JHistory.hh:98
JHistory& JFIT::JHistory::add ( const int  type)
inline

Add event to history.

Parameters
typeapplication type
Returns
this history

Definition at line 251 of file JHistory.hh.

252  {
253  push_back(JEvent(type, this->size() + 1));
254 
255  return *this;
256  }
JFIT::JEvent JEvent
Definition: JHistory.hh:282
JFIT::JHistory::ClassDef ( JHistory  ,
1   
)

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 266 of file JHistory.hh.

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

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