summaryrefslogtreecommitdiff
path: root/include/gras/element.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/gras/element.hpp')
-rw-r--r--include/gras/element.hpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/include/gras/element.hpp b/include/gras/element.hpp
index 3142510..34cdb45 100644
--- a/include/gras/element.hpp
+++ b/include/gras/element.hpp
@@ -36,22 +36,6 @@ struct GRAS_API Element : boost::shared_ptr<ElementImpl>, boost::enable_shared_f
//! Creates a new element given the name
Element(const std::string &name);
- /*!
- * Create an element from a shared pointer to an element.
- * Good for that factory function/shared ptr paradigm.
- */
- template <typename T>
- Element(const boost::shared_ptr<T> &elem)
- {
- *this = elem->shared_to_element();
- }
-
- //! Convert a shared ptr of a derived class to an Element
- Element &shared_to_element(void);
-
- //! for internal use only
- boost::weak_ptr<Element> weak_self;
-
//! An integer ID that is unique across the process
long unique_id(void) const;
@@ -69,6 +53,25 @@ struct GRAS_API Element : boost::shared_ptr<ElementImpl>, boost::enable_shared_f
const gras::IOSignature &output_signature(void) const;
+ /*******************************************************************
+ * Compatibility for dealing with shared ptrs of Elements
+ ******************************************************************/
+ /*!
+ * Create an element from a shared pointer to an element.
+ * Good for that factory function/shared ptr paradigm.
+ */
+ template <typename T>
+ Element(const boost::shared_ptr<T> &elem)
+ {
+ *this = elem->shared_to_element();
+ }
+
+ //! Convert a shared ptr of a derived class to an Element
+ Element &shared_to_element(void);
+
+ //! for internal use only
+ boost::weak_ptr<Element> weak_self;
+
};
} //namespace gras