Commit 8077adc7 authored by François Grisez's avatar François Grisez

Remove 'using namespace' from headers

parent 5b694798
This diff is collapsed.
......@@ -27,52 +27,50 @@
#include <string>
#include <sstream>
using namespace::std;
using namespace::belr;
namespace belcard {
class BelCardAddress : public BelCardProperty {
private:
string _po_box;
string _extended_address;
string _street;
string _locality;
string _region;
string _postal_code;
string _country;
shared_ptr<BelCardLabelParam> _label_param;
std::string _po_box;
std::string _extended_address;
std::string _street;
std::string _locality;
std::string _region;
std::string _postal_code;
std::string _country;
std::shared_ptr<BelCardLabelParam> _label_param;
public:
BELCARD_PUBLIC static shared_ptr<BelCardAddress> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardAddress> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardAddress();
BELCARD_PUBLIC void setPostOfficeBox(const string &value);
BELCARD_PUBLIC const string &getPostOfficeBox() const;
BELCARD_PUBLIC void setPostOfficeBox(const std::string &value);
BELCARD_PUBLIC const std::string &getPostOfficeBox() const;
BELCARD_PUBLIC void setExtendedAddress(const string &value);
BELCARD_PUBLIC const string &getExtendedAddress() const;
BELCARD_PUBLIC void setExtendedAddress(const std::string &value);
BELCARD_PUBLIC const std::string &getExtendedAddress() const;
BELCARD_PUBLIC void setStreet(const string &value);
BELCARD_PUBLIC const string &getStreet() const;
BELCARD_PUBLIC void setStreet(const std::string &value);
BELCARD_PUBLIC const std::string &getStreet() const;
BELCARD_PUBLIC void setLocality(const string &value);
BELCARD_PUBLIC const string &getLocality() const;
BELCARD_PUBLIC void setLocality(const std::string &value);
BELCARD_PUBLIC const std::string &getLocality() const;
BELCARD_PUBLIC void setRegion(const string &value);
BELCARD_PUBLIC const string &getRegion() const;
BELCARD_PUBLIC void setRegion(const std::string &value);
BELCARD_PUBLIC const std::string &getRegion() const;
BELCARD_PUBLIC void setPostalCode(const string &value);
BELCARD_PUBLIC const string &getPostalCode() const;
BELCARD_PUBLIC void setPostalCode(const std::string &value);
BELCARD_PUBLIC const std::string &getPostalCode() const;
BELCARD_PUBLIC void setCountry(const string &value);
BELCARD_PUBLIC const string &getCountry() const;
BELCARD_PUBLIC void setCountry(const std::string &value);
BELCARD_PUBLIC const std::string &getCountry() const;
BELCARD_PUBLIC void setLabelParam(const shared_ptr<BelCardLabelParam> &param);
BELCARD_PUBLIC const shared_ptr<BelCardLabelParam> &getLabelParam() const;
BELCARD_PUBLIC void setLabelParam(const std::shared_ptr<BelCardLabelParam> &param);
BELCARD_PUBLIC const std::shared_ptr<BelCardLabelParam> &getLabelParam() const;
BELCARD_PUBLIC virtual void serialize(ostream &output) const;
BELCARD_PUBLIC virtual void serialize(std::ostream &output) const;
};
}
......
......@@ -26,30 +26,28 @@
#include <string>
using namespace::std;
using namespace::belr;
namespace belcard {
class BelCardFBURL : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardFBURL> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardFBURL> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardFBURL();
};
class BelCardCALADRURI : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardCALADRURI> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardCALADRURI> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardCALADRURI();
};
class BelCardCALURI : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardCALURI> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardCALURI> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardCALURI();
};
......
......@@ -27,38 +27,36 @@
#include <string>
#include <sstream>
using namespace::std;
using namespace::belr;
namespace belcard {
class BelCardPhoneNumber : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardPhoneNumber> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardPhoneNumber> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardPhoneNumber();
};
class BelCardEmail : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardEmail> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardEmail> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardEmail();
};
class BelCardImpp : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardImpp> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardImpp> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardImpp();
};
class BelCardLang : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardLang> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardLang> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardLang();
};
......
......@@ -26,70 +26,68 @@
#include <string>
using namespace::std;
using namespace::belr;
namespace belcard {
class BelCardCategories : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardCategories> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardCategories> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardCategories();
};
class BelCardNote : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardNote> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardNote> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardNote();
};
class BelCardProductId : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardProductId> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardProductId> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardProductId();
};
class BelCardRevision : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardRevision> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardRevision> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardRevision();
};
class BelCardSound : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardSound> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardSound> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardSound();
};
class BelCardUniqueId : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardUniqueId> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardUniqueId> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardUniqueId();
};
class BelCardClientProductIdMap : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardClientProductIdMap> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardClientProductIdMap> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardClientProductIdMap();
};
class BelCardURL : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardURL> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardURL> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardURL();
};
......
......@@ -26,30 +26,28 @@
#include <string>
using namespace::std;
using namespace::belr;
namespace belcard {
class BelCardKind : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardKind> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardKind> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardKind();
};
class BelCardSource : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardSource> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardSource> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardSource();
};
class BelCardXML : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardXML> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardXML> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardXML();
};
......
......@@ -25,34 +25,33 @@
#include <memory>
#include <sstream>
using namespace::std;
namespace belcard {
class BelCardGeneric {
friend class BelCardParser;
public:
template<typename T>
static shared_ptr<T> create() {
return make_shared<T>();
static std::shared_ptr<T> create() {
return std::make_shared<T>();
}
template<typename T>
static bool isValid(const shared_ptr<T> &property) {
static bool isValid(const std::shared_ptr<T> &property) {
return T::parse(property->toString()) != nullptr;
}
BELCARD_PUBLIC BelCardGeneric() { }
BELCARD_PUBLIC virtual ~BelCardGeneric() { } // A virtual destructor enables polymorphism and dynamic casting.
BELCARD_PUBLIC virtual void serialize(ostream &output) const = 0; // Force heriting classes to define this
BELCARD_PUBLIC virtual void serialize(std::ostream &output) const = 0; // Force heriting classes to define this
BELCARD_PUBLIC friend ostream &operator<<(ostream &output, const BelCardGeneric &me) {
BELCARD_PUBLIC friend std::ostream &operator<<(std::ostream &output, const BelCardGeneric &me) {
me.serialize(output);
return output;
}
BELCARD_PUBLIC virtual string toString() const {
stringstream output;
BELCARD_PUBLIC virtual std::string toString() const {
std::stringstream output;
output << *this;
return output.str();
}
......
......@@ -26,22 +26,20 @@
#include <string>
using namespace::std;
using namespace::belr;
namespace belcard {
class BelCardTimezone : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardTimezone> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardTimezone> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardTimezone();
};
class BelCardGeo : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardGeo> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardGeo> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardGeo();
};
......
......@@ -28,86 +28,84 @@
#include <list>
#include <sstream>
using namespace::std;
using namespace::belr;
namespace belcard {
class BelCardFullName : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardFullName> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardFullName> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardFullName();
};
class BelCardName : public BelCardProperty {
private:
string _family_name;
string _given_name;
string _additional_name;
string _prefixes;
string _suffixes;
std::string _family_name;
std::string _given_name;
std::string _additional_name;
std::string _prefixes;
std::string _suffixes;
public:
BELCARD_PUBLIC static shared_ptr<BelCardName> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser) ;
BELCARD_PUBLIC static std::shared_ptr<BelCardName> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser) ;
BELCARD_PUBLIC BelCardName();
BELCARD_PUBLIC void setFamilyName(const string &value);
BELCARD_PUBLIC const string &getFamilyName() const;
BELCARD_PUBLIC void setFamilyName(const std::string &value);
BELCARD_PUBLIC const std::string &getFamilyName() const;
BELCARD_PUBLIC void setGivenName(const string &value);
BELCARD_PUBLIC const string &getGivenName() const;
BELCARD_PUBLIC void setGivenName(const std::string &value);
BELCARD_PUBLIC const std::string &getGivenName() const;
BELCARD_PUBLIC void setAdditionalName(const string &value);
BELCARD_PUBLIC const string &getAdditionalName() const;
BELCARD_PUBLIC void setAdditionalName(const std::string &value);
BELCARD_PUBLIC const std::string &getAdditionalName() const;
BELCARD_PUBLIC void setPrefixes(const string &value);
BELCARD_PUBLIC const string &getPrefixes() const;
BELCARD_PUBLIC void setPrefixes(const std::string &value);
BELCARD_PUBLIC const std::string &getPrefixes() const;
BELCARD_PUBLIC void setSuffixes(const string &value);
BELCARD_PUBLIC const string &getSuffixes() const;
BELCARD_PUBLIC void setSuffixes(const std::string &value);
BELCARD_PUBLIC const std::string &getSuffixes() const;
BELCARD_PUBLIC virtual void serialize(ostream &output) const;
BELCARD_PUBLIC virtual void serialize(std::ostream &output) const;
};
class BelCardNickname : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardNickname> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardNickname> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardNickname();
};
class BelCardBirthday : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardBirthday> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardBirthday> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardBirthday();
};
class BelCardAnniversary : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardAnniversary> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardAnniversary> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardAnniversary();
};
class BelCardGender : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardGender> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardGender> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardGender();
};
class BelCardPhoto : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardPhoto> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardPhoto> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardPhoto();
};
......
......@@ -26,54 +26,52 @@
#include <string>
using namespace::std;
using namespace::belr;
namespace belcard {
class BelCardTitle : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardTitle> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardTitle> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardTitle();
};
class BelCardRole : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardRole> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardRole> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardRole();
};
class BelCardLogo : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardLogo> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardLogo> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardLogo();
};
class BelCardOrganization : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardOrganization> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardOrganization> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardOrganization();
};
class BelCardMember : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardMember> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardMember> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardMember();
};
class BelCardRelated : public BelCardProperty {
public:
BELCARD_PUBLIC static shared_ptr<BelCardRelated> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardRelated> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardRelated();
};
......
......@@ -27,124 +27,122 @@
#include <string>
#include <sstream>
using namespace::std;
using namespace::belr;
namespace belcard {
class BelCardParam : public BelCardGeneric {
private:
string _name;
string _value;
std::string _name;
std::string _value;
public:
template <typename T>
static shared_ptr<T> parseParam(const string& rule, const string& input);
static shared_ptr<BelCardParam> parse(const string& input);
static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
static void setAllParamsHandlersAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
static std::shared_ptr<T> parseParam(const std::string& rule, const std::string& input);
static std::shared_ptr<BelCardParam> parse(const std::string& input);
static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
static void setAllParamsHandlersAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardParam();
BELCARD_PUBLIC virtual void setName(const string &name);
BELCARD_PUBLIC virtual const string &getName() const;
BELCARD_PUBLIC virtual void setName(const std::string &name);
BELCARD_PUBLIC virtual const std::string &getName() const;
BELCARD_PUBLIC virtual void setValue(const string &value) ;
BELCARD_PUBLIC virtual const string &getValue() const;
BELCARD_PUBLIC virtual void setValue(const std::string &value) ;
BELCARD_PUBLIC virtual const std::string &getValue() const;
BELCARD_PUBLIC virtual void serialize(ostream &output) const;
BELCARD_PUBLIC virtual void serialize(std::ostream &output) const;
};
class BelCardLanguageParam : public BelCardParam {
public:
BELCARD_PUBLIC static shared_ptr<BelCardLanguageParam> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardLanguageParam> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardLanguageParam();
};
class BelCardValueParam : public BelCardParam {
public:
BELCARD_PUBLIC static shared_ptr<BelCardValueParam> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardValueParam> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardValueParam();
};
class BelCardPrefParam : public BelCardParam {
public:
BELCARD_PUBLIC static shared_ptr<BelCardPrefParam> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardPrefParam> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardPrefParam();
};
class BelCardAlternativeIdParam : public BelCardParam {
public:
BELCARD_PUBLIC static shared_ptr<BelCardAlternativeIdParam> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardAlternativeIdParam> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardAlternativeIdParam();
};
class BelCardParamIdParam : public BelCardParam {
public:
BELCARD_PUBLIC static shared_ptr<BelCardParamIdParam> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardParamIdParam> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardParamIdParam();
};
class BelCardTypeParam : public BelCardParam {
public:
BELCARD_PUBLIC static shared_ptr<BelCardTypeParam> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardTypeParam> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardTypeParam();
};
class BelCardMediaTypeParam : public BelCardParam {
public:
BELCARD_PUBLIC static shared_ptr<BelCardMediaTypeParam> parse(const string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(Parser<shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC static std::shared_ptr<BelCardMediaTypeParam> parse(const std::string& input);
BELCARD_PUBLIC static void setHandlerAndCollectors(belr::Parser<std::shared_ptr<BelCardGeneric>> *parser);
BELCARD_PUBLIC BelCardMediaTypeParam();
};