25 |
#include <string> |
#include <string> |
26 |
#include <vector> |
#include <vector> |
27 |
#include "patterns/SmartPtr.hh" |
#include "patterns/SmartPtr.hh" |
28 |
#include "GEDCOMParser/Event.hh" |
#include "GEDCOMParser/EventDetailManager.hh" |
29 |
#include "GEDCOMParser/Visitor/GEDCOMElement.hh" |
#include "GEDCOMParser/Visitor/GEDCOMElement.hh" |
30 |
|
|
31 |
/// |
/// |
33 |
{ |
{ |
34 |
class GEDCOMVisitor; |
class GEDCOMVisitor; |
35 |
/// @memo Implements the GEDCOM 5.5 INDIVIDUAL_ATTRIBUTE_STRUCTURE structure |
/// @memo Implements the GEDCOM 5.5 INDIVIDUAL_ATTRIBUTE_STRUCTURE structure |
36 |
class IndividualAttribute : public GEDCOMElement |
class IndividualAttribute : public GEDCOMElement, |
37 |
|
public EventDetailManager |
38 |
{ |
{ |
39 |
public: |
public: |
40 |
/// @memo Implements the GEDCOM 5.5 ATTRIBUTE_TYPE enumeration (typedef'd to enumIndividualAttributes) |
/// @memo Implements the GEDCOM 5.5 ATTRIBUTE_TYPE enumeration (typedef'd to enumIndividualAttributes) |
73 |
|
|
74 |
IndividualAttribute (enumIndividualAttributes type = e_None): |
IndividualAttribute (enumIndividualAttributes type = e_None): |
75 |
_type (type), |
_type (type), |
76 |
_value (), |
_value () |
|
_event () |
|
77 |
{ |
{ |
78 |
}; |
}; |
79 |
IndividualAttribute (IndividualAttribute const &i): |
IndividualAttribute (IndividualAttribute const &i): |
80 |
_type (i._type), |
_type (i._type), |
81 |
_value (i._value), |
_value (i._value) |
|
_event (i._event) |
|
82 |
{ |
{ |
83 |
} |
} |
84 |
virtual ~IndividualAttribute (void) |
virtual ~IndividualAttribute (void) |
90 |
/// |
/// |
91 |
void setValue (std::string const &); |
void setValue (std::string const &); |
92 |
/// |
/// |
|
void setEvent (Event *); |
|
|
/// |
|
93 |
//@} |
//@} |
94 |
|
|
95 |
///@name Accessors (get) |
///@name Accessors (get) |
98 |
/// |
/// |
99 |
virtual std::string const &getValue(void) const; |
virtual std::string const &getValue(void) const; |
100 |
/// |
/// |
|
SmartPtr<Event> const &getEvent(void) const; |
|
|
/// |
|
101 |
//@} |
//@} |
102 |
|
|
103 |
/// operator == used to find an attribute by its type |
/// operator == used to find an attribute by its type |
109 |
protected: |
protected: |
110 |
enumIndividualAttributes _type; |
enumIndividualAttributes _type; |
111 |
std::string _value; |
std::string _value; |
|
SmartPtr<Event> _event; |
|
112 |
}; |
}; |
113 |
///@name typedefs |
///@name typedefs |
114 |
//@{ |
//@{ |