Universe Class Reference

#include <orsa_universe.h>

List of all members.

Public Types

typedef std::vector< Evolution * >
::iterator 
iterator
typedef std::vector< Evolution * >
::const_iterator 
const_iterator

Public Member Functions

 Universe ()
 Universe (length_unit, mass_unit, time_unit, UniverseType=Simulated, ReferenceSystem=ECLIPTIC, TimeScale=ET)
virtual ~Universe ()
virtual unsigned int size () const
virtual void push_back (Evolution *const e)
virtual reference operator[] (size_type n)
virtual const_reference operator[] (size_type n) const
virtual void clear ()
virtual iterator begin ()
virtual iterator end ()
virtual iterator erase (iterator position)
virtual const_iterator begin () const
virtual const_iterator end () const
UniverseType GetUniverseType () const
ReferenceSystem GetReferenceSystem () const
TimeScale GetTimeScale () const

Public Attributes

std::string name
std::string description
bool modified


Detailed Description

Definition at line 165 of file orsa_universe.h.


Member Typedef Documentation

typedef std::vector<Evolution*>::const_iterator const_iterator

Definition at line 184 of file orsa_universe.h.

typedef std::vector<Evolution*>::iterator iterator

Definition at line 183 of file orsa_universe.h.


Constructor & Destructor Documentation

Universe (  ) 

Definition at line 56 of file orsa_universe.cc.

References orsa::AU, orsa::MSUN, and orsa::YEAR.

00056                      : std::vector<Evolution*>(), type(Simulated), sys(ECLIPTIC), timescale(ET) {
00057     common_init(AU,MSUN,YEAR);
00058   }

Universe ( length_unit  lu,
mass_unit  mu,
time_unit  tu,
UniverseType  ut = Simulated,
ReferenceSystem  rs = ECLIPTIC,
TimeScale  ts = ET 
)

Definition at line 60 of file orsa_universe.cc.

00060                                                                                                                   : std::vector<Evolution*>(), type(ut), sys(rs), timescale(ts) {
00061     common_init(lu,mu,tu);
00062   }

~Universe (  )  [virtual]

Definition at line 103 of file orsa_universe.cc.

References Universe::size(), and orsa::universe.

00103                       {
00104     /* 
00105        int k;
00106        k = size();
00107        while (k>0) {
00108        --k;
00109        if ((*this)[k]) (*this)[k]->clear();
00110        }
00111     */
00112     // NOTE: keep these two loops separate!
00113     int k = size();
00114     while (k>0) {
00115       --k;
00116       delete (*this)[k];
00117       (*this)[k] = 0;
00118     }
00119     
00120     universe = 0;
00121   }

Here is the call graph for this function:


Member Function Documentation

virtual const_iterator begin (  )  const [inline, virtual]

Definition at line 191 of file orsa_universe.h.

References Universe::begin().

00191 { return std::vector<Evolution*>::begin(); }

Here is the call graph for this function:

virtual iterator begin (  )  [inline, virtual]

Definition at line 187 of file orsa_universe.h.

Referenced by Universe::begin().

00187 { return std::vector<Evolution*>::begin(); }

virtual void clear (  )  [inline, virtual]

Definition at line 180 of file orsa_universe.h.

virtual const_iterator end (  )  const [inline, virtual]

Definition at line 192 of file orsa_universe.h.

References Universe::end().

00192 { return std::vector<Evolution*>::end(); }

Here is the call graph for this function:

virtual iterator end (  )  [inline, virtual]

Definition at line 188 of file orsa_universe.h.

Referenced by Universe::end().

00188 { return std::vector<Evolution*>::end(); }

virtual iterator erase ( iterator  position  )  [inline, virtual]

Definition at line 189 of file orsa_universe.h.

00189 { return std::vector<Evolution*>::erase(position); }

ReferenceSystem GetReferenceSystem (  )  const [inline]

TimeScale GetTimeScale (  )  const [inline]

Definition at line 197 of file orsa_universe.h.

00197 { return timescale; }

UniverseType GetUniverseType (  )  const [inline]

virtual const_reference operator[] ( size_type  n  )  const [inline, virtual]

Definition at line 179 of file orsa_universe.h.

References Universe::operator[]().

Here is the call graph for this function:

virtual reference operator[] ( size_type  n  )  [inline, virtual]

Definition at line 178 of file orsa_universe.h.

Referenced by Universe::operator[]().

virtual void push_back ( Evolution *const   e  )  [inline, virtual]

Definition at line 177 of file orsa_universe.h.

virtual unsigned int size (  )  const [inline, virtual]

Definition at line 176 of file orsa_universe.h.

Referenced by OrsaFile::Read(), and Universe::~Universe().

00176 { return std::vector<Evolution*>::size(); }


Member Data Documentation

std::string description

Definition at line 201 of file orsa_universe.h.

bool modified

Definition at line 204 of file orsa_universe.h.

std::string name

Definition at line 200 of file orsa_universe.h.


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

Generated on Sat Aug 15 19:04:58 2009 for liborsa by  doxygen 1.5.9