1 |
/** |
/* |
2 |
Copyright 2002 Cyril Picard |
Copyright 2002 Cyril Picard |
3 |
|
|
4 |
This file is part of the GEDCOMParser library |
This file is part of the GEDCOMParser library |
18 |
along with the GEDCOMParser library ; if not, write to the Free Software |
along with the GEDCOMParser library ; if not, write to the Free Software |
19 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 |
|
|
21 |
**/ |
*/ |
22 |
|
|
23 |
#ifndef _GEDCOMPARSER_DATEMANAGEMENT_RANGE_HH_ |
#ifndef _GEDCOMPARSER_DATEMANAGEMENT_RANGE_HH_ |
24 |
#define _GEDCOMPARSER_DATEMANAGEMENT_RANGE_HH_ |
#define _GEDCOMPARSER_DATEMANAGEMENT_RANGE_HH_ |
25 |
|
|
26 |
#include "GEDCOMParser/DateManagement/Date.hh" |
#include "GEDCOMParser/DateManagement/Date.hh" |
27 |
|
|
28 |
|
/// |
29 |
namespace GEDCOMParser |
namespace GEDCOMParser |
30 |
{ |
{ |
31 |
|
/// |
32 |
namespace DateManagement |
namespace DateManagement |
33 |
{ |
{ |
|
class Range |
|
34 |
/** @memo Implements the GEDCOM 5.5 DATE_RANGE primitive element |
/** @memo Implements the GEDCOM 5.5 DATE_RANGE primitive element |
35 |
*/ |
**/ |
36 |
|
class Range |
37 |
{ |
{ |
38 |
public: |
public: |
39 |
/// @memo Implements the range types enumeration (typedef'd to enumRangeTypes) |
/// @memo Implements the range types enumeration (typedef'd to enumRangeTypes) |
48 |
/// |
/// |
49 |
e_Between |
e_Between |
50 |
}; |
}; |
51 |
|
/// |
52 |
typedef enum _enumRangeTypes enumRangeTypes; |
typedef enum _enumRangeTypes enumRangeTypes; |
53 |
Range(void) : |
Range(void) : |
54 |
_type(e_Null), |
_type(e_Null), |
77 |
delete _bound2; _bound2 = 0; |
delete _bound2; _bound2 = 0; |
78 |
return; |
return; |
79 |
}; |
}; |
80 |
|
///@name Accessors (set) |
81 |
|
//@{ |
82 |
|
/// |
83 |
void setType(enumRangeTypes type); |
void setType(enumRangeTypes type); |
84 |
|
/// |
85 |
void setBound1(GEDCOMParser::DateManagement::Date const &bound1); |
void setBound1(GEDCOMParser::DateManagement::Date const &bound1); |
86 |
|
/// |
87 |
void setBound2(GEDCOMParser::DateManagement::Date const &bound2); |
void setBound2(GEDCOMParser::DateManagement::Date const &bound2); |
88 |
|
//@} |
89 |
|
|
90 |
|
///@name Accessors (get) |
91 |
|
//@{ |
92 |
|
/// |
93 |
std::string const getDisplayValue(void) const; |
std::string const getDisplayValue(void) const; |
94 |
|
//@} |
95 |
private: |
private: |
96 |
enumRangeTypes _type; |
enumRangeTypes _type; |
97 |
GEDCOMParser::DateManagement::Date * _bound1; |
GEDCOMParser::DateManagement::Date * _bound1; |