BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
Converter.h
Go to the documentation of this file.
1// $Id: Converter.h,v 1.1.1.1 2005/10/17 06:11:40 maqm Exp $
2//
3// Original author: Sawyer Gillespie
5//
6
7#ifndef _H_Converter_facilities_
8#define _H_Converter_facilities_
9
10// class Converter
11// Template class to define the converter behavior. This is really just
12// specifying a pattern.
13//
14template <class Ty1, class Ty2>
15class Converter {
16public:
17 // type declarations
18 typedef Ty1 source;
19 typedef Ty2 destination;
20
21 // declare the forward method
22 inline destination* operator (const source&) const;
23
24protected:
25 // do the actual conversion here
26 virtual destination* convert (const source&) const = 0;
27};
28
29// inline declarations
30
31template <class Ty1, class Ty2>
34{
35 return convert (s);
36}
37
38#endif // _H_Converter_facilities_
XmlRpcServer s
virtual destination * convert(const source &) const =0
destination * operator(const source &) const
Ty1 source
Definition Converter.h:18
Ty2 destination
Definition Converter.h:19