diff --git a/src/factory/FieldCreateFactory.cpp b/src/factory/FieldCreateFactory.cpp index c4335a6..b213062 100644 --- a/src/factory/FieldCreateFactory.cpp +++ b/src/factory/FieldCreateFactory.cpp @@ -532,6 +532,15 @@ string Structure::getID() const return id; } +FieldConstPtr Structure::getField(string const & fieldName) const { + for(size_t i=0, N=fields.size(); i std::tr1::shared_ptr getField(std::string const &fieldName) const @@ -751,7 +751,7 @@ public: * @return The introspection interface. * This will hold a null pointer if the field is not in the structure. */ - FieldConstPtr getField(std::size_t index) const {return getFieldImpl(index, false);} + const FieldConstPtr& getField(std::size_t index) const {return fields.at(index);} template std::tr1::shared_ptr getField(std::size_t index) const @@ -872,7 +872,7 @@ public: * @return The introspection interface. * This will hold a null pointer if the field is not in the union. */ - FieldConstPtr getField(std::string const &fieldName) const {return getFieldImpl(fieldName, false);}; + FieldConstPtr getField(std::string const &fieldName) const; template std::tr1::shared_ptr getField(std::string const &fieldName) const @@ -904,7 +904,7 @@ public: * @return The introspection interface. * This will hold a null pointer if the field is not in the union. */ - FieldConstPtr getField(std::size_t index) const {return getFieldImpl(index, false);} + FieldConstPtr getField(std::size_t index) const {return fields.at(index);} template std::tr1::shared_ptr getField(std::size_t index) const