| 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_DATEVALUE_HH_ |
#ifndef _GEDCOMPARSER_DATEMANAGEMENT_DATEVALUE_HH_ |
| 24 |
#define _GEDCOMPARSER_DATEMANAGEMENT_DATEVALUE_HH_ |
#define _GEDCOMPARSER_DATEMANAGEMENT_DATEVALUE_HH_ |
| 30 |
#include "GEDCOMParser/DateManagement/Period.hh" |
#include "GEDCOMParser/DateManagement/Period.hh" |
| 31 |
#include <string> |
#include <string> |
| 32 |
|
|
| 33 |
|
/// Package GEDCOMParser |
| 34 |
namespace GEDCOMParser |
namespace GEDCOMParser |
| 35 |
{ |
{ |
| 36 |
|
/// Implements the dates management (essentially parsing) in GEDCOM files |
| 37 |
namespace DateManagement |
namespace DateManagement |
| 38 |
{ |
{ |
|
class DateValue |
|
| 39 |
/** @memo Implements the GEDCOM 5.5 DATE_VALUE primitive element |
/** @memo Implements the GEDCOM 5.5 DATE_VALUE primitive element |
| 40 |
*/ |
**/ |
| 41 |
|
class DateValue |
| 42 |
{ |
{ |
| 43 |
public: |
public: |
| 44 |
/// @memo Implements the range types enumeration (typedef'd to enumRangeTypes) |
/// @memo Implements the range types enumeration (typedef'd to enumRangeTypes) |
| 94 |
delete _period; _period = 0; |
delete _period; _period = 0; |
| 95 |
delete _range; _range = 0; |
delete _range; _range = 0; |
| 96 |
}; |
}; |
| 97 |
|
///@name Accessors (set) |
| 98 |
|
//@{ |
| 99 |
|
/// |
| 100 |
void setType(enumDateValueTypes type); |
void setType(enumDateValueTypes type); |
| 101 |
|
/// |
| 102 |
void setDate(GEDCOMParser::DateManagement::Date const &date); |
void setDate(GEDCOMParser::DateManagement::Date const &date); |
| 103 |
|
/// |
| 104 |
void setDatePhrase(GEDCOMParser::DateManagement::DatePhrase const &date_phrase); |
void setDatePhrase(GEDCOMParser::DateManagement::DatePhrase const &date_phrase); |
| 105 |
|
/// |
| 106 |
void setPeriod(GEDCOMParser::DateManagement::Period const &period); |
void setPeriod(GEDCOMParser::DateManagement::Period const &period); |
| 107 |
|
/// |
| 108 |
void setRange(GEDCOMParser::DateManagement::Range const &range); |
void setRange(GEDCOMParser::DateManagement::Range const &range); |
| 109 |
|
/// |
| 110 |
void setValue(std::string const &value); |
void setValue(std::string const &value); |
| 111 |
|
//@} |
| 112 |
|
|
| 113 |
|
///@name Accessors (get) |
| 114 |
|
//@{ |
| 115 |
|
/// |
| 116 |
std::string const getDisplayValue(void) const; |
std::string const getDisplayValue(void) const; |
| 117 |
|
//@} |
| 118 |
private: |
private: |
| 119 |
std::string _raw_value; |
std::string _raw_value; |
| 120 |
enumDateValueTypes _type; |
enumDateValueTypes _type; |