DSObject: add/implments setName function 56/241556/1
authorSung-Jin Park <sj76.park@samsung.com>
Wed, 1 Jul 2020 07:27:41 +0000 (16:27 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 09:45:14 +0000 (18:45 +0900)
Change-Id: I5477271a66685267348a255b539fd82e53d76241
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/DSObject/DSObject.cpp
src/DSObject/DSObject.h
src/DSObject/DSObjectPrivate.cpp
src/DSObject/DSObjectPrivate.h

index d90bc75..2c0f327 100644 (file)
@@ -37,6 +37,11 @@ std::string DSObject::getName(void)
        return __d_func()->getName();
 }
 
+void DSObject::setName(std::string name)
+{
+       __d_func()->setName(name);
+}
+
 DSObject::DSObject(std::unique_ptr<DSObjectPrivate> ptr)
 {
        _d_ptr = std::move(ptr);
index 1ae29d3..1548b3f 100644 (file)
@@ -22,6 +22,7 @@ public:
        void setProperty(std::string key, const DSPropertyVariant &data, DSPropertyType type);
        const DSPropertyVariant &getProperty(std::string key);
        std::string getName(void);
+       void setName(std::string name);
 
 protected:
        DSObject(std::unique_ptr<DSObjectPrivate> ptr);
index f33eac5..6dee536 100644 (file)
@@ -56,6 +56,11 @@ namespace display_server
                return __type_info.name;
        }
 
+       void DSObjectPrivate::setName(std::string name)
+       {
+               __type_info.name = name;
+       }
+
        DSObjectPrivate& DSObjectPrivate::operator=(DSObjectPrivate &&p)
        {
                if (__p_ptr)
index eddbfca..5eb8f58 100644 (file)
@@ -25,6 +25,7 @@ public:
        void setProperty(std::string key, const DSPropertyVariant &data, DSPropertyType type);
        const DSPropertyVariant &getProperty(std::string key);
        std::string getName(void);
+       void setName(std::string name);
 
        DSObjectPrivate &operator=(DSObjectPrivate &&p); //move assignment
 
@@ -32,6 +33,7 @@ public:
        {
                return __p_ptr;
        }
+
 private:
        struct
        {