26 template<
class T,
class JMultiPo
inter_t>
27 inline void print(std::ostream& out, JMultiPointer_t& ps,
const JType<T>& type)
29 T* __p = ps.template get<T>();
46 template<
class JMultiPo
inter_t>
49 const char* __p = ps.template get<const char>();
63 template<
class T,
class JMultiPo
inter_t>
64 inline void print(std::ostream& out, JMultiPointer_t& ps)
66 out <<
"JMultiPointer: <";
70 out <<
">" << std::endl;
81int main(
int argc,
char **argv)
89 JParser<> zap(
"Example program to test multi pointer.");
95 catch(
const exception &error) {
96 FATAL(error.what() << endl);
107 delete ps.
get<
int>();
120 ps.
reset(
new int(1));
121 ps.
reset(
new double(123.456));
123 *ps.
get<
int>() += 10;
129 delete ps.
get<
int> ();
130 delete ps.
get<
double>();
General purpose messaging.
int main(int argc, char **argv)
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
std::ostream & print(std::ostream &out, const JTestSummary &summary, const char delimiter=' ', const bool useColors=true)
Print test summary.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
General purpose class for multiple pointers.
T * get() const
Get single pointer.
void reset(const JMultiPointer< JClass_t > &pointer)
Reset multi-pointer.
Auxiliary class for a type holder.