summaryrefslogtreecommitdiffabout
path: root/include
authorMichael Krelin <hacker@klever.net>2007-12-21 21:24:01 (UTC)
committer Michael Krelin <hacker@klever.net>2008-01-04 18:16:09 (UTC)
commitac9e3ddb4277e5696d789ad6b3ea7aa820a5e76a (patch) (side-by-side diff)
tree00e1b73988a72a0d0886a10a8a833051942d5e0f /include
parent24a6f9e3525b76ed1aa787f66b003b01b767af39 (diff)
downloadlibopkele-ac9e3ddb4277e5696d789ad6b3ea7aa820a5e76a.zip
libopkele-ac9e3ddb4277e5696d789ad6b3ea7aa820a5e76a.tar.gz
libopkele-ac9e3ddb4277e5696d789ad6b3ea7aa820a5e76a.tar.bz2
idiscovery_t() default constructor and a couple of helpers
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'include') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/discovery.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/opkele/discovery.h b/include/opkele/discovery.h
index 7865fb2..af4aa29 100644
--- a/include/opkele/discovery.h
+++ b/include/opkele/discovery.h
@@ -8,27 +8,33 @@ namespace opkele {
using std::string;
struct idiscovery_t;
void idiscover(idiscovery_t& result,const string& identity);
struct idiscovery_t {
bool xri_identity;
string normalized_id;
string canonicalized_id;
xrd::XRD_t xrd;
+ idiscovery_t() { }
idiscovery_t(const string& i) {
idiscover(*this,i);
}
idiscovery_t(const char *i) {
idiscover(*this,i);
}
void clear() {
normalized_id.clear(); canonicalized_id.clear();
xrd.clear();
}
+
+ idiscovery_t& operator=(const string& i) {
+ idiscover(*this,i); return *this; }
+ idiscovery_t& operator=(const char *i) {
+ idiscover(*this,i); return *this; }
};
}
#endif /* __OPKELE_DISCOVERY_H */