1 |
samvel |
1.1 |
/**
|
2 |
|
|
* TreeInfo
|
3 |
|
|
* s8
|
4 |
|
|
*
|
5 |
|
|
* Created by Samvel Khalatian on Oct 22, 2010
|
6 |
|
|
* Copyright 2010, All rights reserved
|
7 |
|
|
*/
|
8 |
|
|
|
9 |
|
|
#ifndef S8_TREEINFO
|
10 |
|
|
#define S8_TREEINFO
|
11 |
|
|
|
12 |
|
|
#include <ostream>
|
13 |
|
|
#include <utility>
|
14 |
|
|
|
15 |
|
|
#include <TObject.h>
|
16 |
|
|
#include <Rtypes.h>
|
17 |
|
|
|
18 |
|
|
namespace s8
|
19 |
|
|
{
|
20 |
|
|
// Currently TreeInfo is not used.
|
21 |
|
|
//
|
22 |
|
|
class Version
|
23 |
|
|
{
|
24 |
|
|
public:
|
25 |
|
|
typedef std::pair<int, int> VersionPair; // <major, minor>
|
26 |
|
|
|
27 |
|
|
Version() throw();
|
28 |
|
|
|
29 |
|
|
VersionPair operator()() const;
|
30 |
|
|
|
31 |
|
|
void set(const VersionPair &);
|
32 |
|
|
|
33 |
|
|
private:
|
34 |
|
|
std::pair<int, int> _version;
|
35 |
|
|
};
|
36 |
|
|
|
37 |
|
|
std::ostream &operator<<(std::ostream &, const Version &);
|
38 |
|
|
|
39 |
|
|
bool operator==(const Version &, const Version &);
|
40 |
|
|
bool operator!=(const Version &, const Version &);
|
41 |
|
|
bool operator <(const Version &, const Version &);
|
42 |
|
|
bool operator<=(const Version &, const Version &);
|
43 |
|
|
bool operator >(const Version &, const Version &);
|
44 |
|
|
bool operator>=(const Version &, const Version &);
|
45 |
|
|
|
46 |
|
|
class TreeInfo: public TObject
|
47 |
|
|
{
|
48 |
|
|
public:
|
49 |
|
|
TreeInfo() throw();
|
50 |
|
|
|
51 |
|
|
void merge(const TreeInfo &);
|
52 |
|
|
|
53 |
|
|
Version version() const;
|
54 |
|
|
|
55 |
|
|
private:
|
56 |
|
|
Version _version;
|
57 |
|
|
|
58 |
|
|
ClassDef(TreeInfo, 1);
|
59 |
|
|
};
|
60 |
|
|
}
|
61 |
|
|
|
62 |
|
|
#endif
|