diff --git a/wrap/Qualified.h b/wrap/Qualified.h index 899ac3541..4dc15dda1 100644 --- a/wrap/Qualified.h +++ b/wrap/Qualified.h @@ -48,14 +48,23 @@ public: } Category; Category category; + /// Default constructor Qualified() : category(VOID) { } + /// Construct from name and optional category Qualified(const std::string& n, Category c = CLASS) : name_(n), category(c) { } + /// Construct from scoped name and optional category + Qualified(const std::string& ns1, const std::string& n, Category c = CLASS) : + name_(n), category(c) { + namespaces_.push_back(ns1); + } + + /// Construct from doubly scoped name and optional category Qualified(const std::string& ns1, const std::string& ns2, const std::string& n, Category c = CLASS) : name_(n), category(c) { @@ -63,15 +72,14 @@ public: namespaces_.push_back(ns2); } - Qualified(const std::string& ns1, const std::string& n, Category c = CLASS) : - name_(n), category(c) { - namespaces_.push_back(ns1); - } - + /// Construct from arbitrarily scoped name Qualified(std::vector ns, const std::string& name) : namespaces_(ns), name_(name), category(CLASS) { } + // Destructor + virtual ~Qualified() {} + std::string name() const { return name_; } diff --git a/wrap/ReturnValue.h b/wrap/ReturnValue.h index 8b6b199a2..589db5bd6 100644 --- a/wrap/ReturnValue.h +++ b/wrap/ReturnValue.h @@ -27,21 +27,24 @@ struct ReturnValue { friend struct ReturnValueGrammar; - /// Constructor + /// Default constructor ReturnValue() : isPair(false) { } - /// Constructor + /// Construct from type ReturnValue(const ReturnType& type) : isPair(false), type1(type) { } - /// Constructor + /// Construct from pair type arguments ReturnValue(const ReturnType& t1, const ReturnType& t2) : isPair(true), type1(t1), type2(t2) { } + /// Destructor + virtual ~ReturnValue() {} + virtual void clear() { type1.clear(); type2.clear();