24 #include <VCardRToken.h>
25 #include <VCardAdrValue.h>
26 #include <VCardValue.h>
27 #include <VCardDefines.h>
29 using namespace VCARD;
36 AdrValue::AdrValue(
const AdrValue & x)
39 extAddress_ (x.extAddress_),
41 locality_ (x.locality_),
43 postCode_ (x.postCode_),
44 countryName_ (x.countryName_)
48 AdrValue::AdrValue(
const TQCString & s)
54 AdrValue::operator = (AdrValue & x)
56 if (*
this == x)
return *
this;
59 extAddress_ = x.extAddress_;
61 locality_ = x.locality_;
63 postCode_ = x.postCode_;
64 countryName_ = x.countryName_;
66 Value::operator = (x);
71 AdrValue::operator = (
const TQCString & s)
73 Value::operator = (s);
78 AdrValue::operator == (AdrValue & x)
85 extAddress_ == x.extAddress_ &&
86 street_ == x.street_ &&
87 locality_ == x.locality_ &&
88 region_ == x.region_ &&
89 postCode_ == x.postCode_ &&
90 countryName_ == x.countryName_);
100 return new AdrValue( *
this );
106 vDebug(
"AdrValue::_parse()");
109 RTokenise(strRep_,
";", l);
111 for (
unsigned int i = 0; i < l.count(); i++) {
115 case 0: poBox_ = l.at(0);
break;
116 case 1: extAddress_ = l.at(1);
break;
117 case 2: street_ = l.at(2);
break;
118 case 3: locality_ = l.at(3);
break;
119 case 4: region_ = l.at(4);
break;
120 case 5: postCode_ = l.at(5);
break;
121 case 6: countryName_ = l.at(6);
break;
128 AdrValue::_assemble()
130 vDebug(
"AdrValue::_assemble");
133 strRep_ +=
";" + extAddress_;
134 strRep_ +=
";" + street_;
135 strRep_ +=
";" + locality_;
136 strRep_ +=
";" + region_;
137 strRep_ +=
";" + postCode_;
138 strRep_ +=
";" + countryName_;