| 22 |
#include "IndividualRecord.hh" |
#include "IndividualRecord.hh" |
| 23 |
#include "patterns/SmartPtr.hh" |
#include "patterns/SmartPtr.hh" |
| 24 |
#include "GEDCOMParser/Visitor/GEDCOMVisitor.hh" |
#include "GEDCOMParser/Visitor/GEDCOMVisitor.hh" |
|
#include "GEDCOMParser/IdGenerator.hh" |
|
| 25 |
|
|
| 26 |
GEDCOMParser::IndividualRecord::IndividualRecord(bool set_id = false) |
GEDCOMParser::IndividualRecord::IndividualRecord(std::string const &id = "") |
| 27 |
{ |
{ |
| 28 |
if (set_id == true) |
if (id != "") |
| 29 |
{ |
{ |
|
std::string id = GEDCOMParser::IdGenerator::getId(); |
|
| 30 |
setId(id); |
setId(id); |
| 31 |
} |
} |
| 32 |
return; |
return; |
| 35 |
void GEDCOMParser::IndividualRecord::setId(std::string const & value) |
void GEDCOMParser::IndividualRecord::setId(std::string const & value) |
| 36 |
{ |
{ |
| 37 |
_id = value; |
_id = value; |
|
GEDCOMParser::IdGenerator::addUsedId(value); |
|
| 38 |
return; |
return; |
| 39 |
} |
} |
| 40 |
|
|