Class xlifepp::PCollection#
-
template<typename T>
class PCollection : public std::vector<T*>#
-
Inheritence diagram for xlifepp::PCollection:
Collaboration diagram for xlifepp::PCollection:
a simple interface to std::vector<T*> hide pointers, add the insertion operator <<, the constructors from enumerating items and access to items using operator ()
Be cautious when using it because pointers are shared (no copy). For instance, if you plan to create a list of T with a loop, do the following
PCollection<T> ts(10); for(int i=0;i<10;++i) ts[i] = new T(…); and clear the T pointers using: ts.clearPointers();
to access to item as const reference you can use either ts(i+1) (same as *ts[i])
Public Functions
-
inline PCollection(const T &t1, const T &t2, const T &t3, const T &t4)#
-
constructor from 4 T objects
-
inline PCollection(const T &t1, const T &t2, const T &t3, const T &t4, const T &t5)#
-
constructor from 5 T objects
-
inline PCollection(const T &t1, const T &t2, const T &t3, const T &t4, const T &t5, const T &t6)#
-
constructor from 6 T objects
-
inline PCollection(const T &t1, const T &t2, const T &t3, const T &t4, const T &t5, const T &t6, const T &t7)#
-
constructor from 7 T objects
-
inline PCollection(const T &t1, const T &t2, const T &t3, const T &t4, const T &t5, const T &t6, const T &t7, const T &t8)#
-
constructor from 8 T objects
-
inline PCollection(const T &t1, const T &t2, const T &t3, const T &t4, const T &t5, const T &t6, const T &t7, const T &t8, const T &t9)#
-
constructor from 9 T objects
-
inline PCollection(const T &t1, const T &t2, const T &t3, const T &t4, const T &t5, const T &t6, const T &t7, const T &t8, const T &t9, const T &t10)#
-
constructor from 10 T objects
-
inline PCollectionItem<T> operator()(number_t n)#
-
access to n-th number (non const)
-
inline void print(PrintStream &os) const#
-
print utility
-
inline void print(std::ostream &out) const#
-
print utility
-
inline PCollection(const T &t1, const T &t2, const T &t3, const T &t4)#