* @param interface Resource interface
*
*/
- Builder(std::string uri, std::string type, std::string interface);
+ Builder(std::string &&uri, std::string &&type, std::string &&interface);
+
+ /**
+ * Constructs a Builder.
+ *
+ * @param uri Resource uri
+ * @param type Resource type
+ * @param interface Resource interface
+ *
+ */
+ Builder(const std::string &uri, const std::string &type, const std::string &interface);
/**
* Add an interface for the resource.
namespace Service
{
- RCSResourceObject::Builder::Builder(std::string uri, std::string type,
- std::string interface) :
+ RCSResourceObject::Builder::Builder(std::string &&uri, std::string &&type,
+ std::string &&interface) :
m_uri{ std::move(uri) },
m_types{ std::move(type) },
m_interfaces{ },
}
}
+ RCSResourceObject::Builder::Builder(const std::string &uri, const std::string &type,
+ const std::string &interface) :
+ m_uri{ uri },
+ m_types{ type },
+ m_interfaces{ interface },
+ m_defaultInterface { BASELINE_INTERFACE },
+ m_properties{ OC_DISCOVERABLE | OC_OBSERVABLE },
+ m_resourceAttributes{ }
+ {
+ }
+
RCSResourceObject::Builder& RCSResourceObject::Builder::addInterface(std::string interface)
{
insertValue(m_interfaces, std::move(interface));