Template Class StarList¶
Defined in File StarList.h
Class Documentation¶
-
template<class
Star
>
classStarList
: public std::list<std::shared_ptr<Star>>¶ std::lists of Stars.
It is a template class, which means that the Star type remains undefined until a user defines it. The std::list related operations (insertion, sort, traversal) are to be carried out using STL list operations. Most of the Star operations rely on routines to be provided in the Star class, usually user defined. The instanciation of this class for BaseStar (i.e. the replacement of the formal parameter ‘Star’ by ‘BaseStar’) is called BaseStarList. Take care: what is stored is pointers on Star’s and NOT Star’s. This implies that Stars being inserted in the std::list have to be obtained using ‘new’.
Public Types
-
typedef std::shared_ptr<Star>
Element
¶
Public Functions
-
StarList
()¶ : default constructor (empty std::list).
-
virtual
~StarList
()¶
-
void
dump
(std::ostream &stream = std::cout) const¶ invokes dump(stream) for all Stars in the std::list.
-
void
fluxSort
()¶ a model routine to sort the std::list
see decreasingFlux() to see what it is, if you want another sorting criterion)
-
void
cutTail
(const int nKeep)¶ cuts the end of the std::list
-
void
extractInFrame
(StarList<Star> &out, const Frame &frame) const¶ copy the part of the std::list which is included in the frame at the end of another std::list
-
void
copyTo
(StarList<Star> ©) const¶ clears copy and makes a copy of the std::list to copy
-
void
clearList
()¶ Clears the std::list.
-
typedef std::shared_ptr<Star>