IoTivity C++ SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SceneCollection.h
Go to the documentation of this file.
1 //******************************************************************
2 //
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 // http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20 
21 #ifndef SM_SCENECOLLECTION_H_
22 #define SM_SCENECOLLECTION_H_
23 
24 #include "Scene.h"
25 
26 namespace OIC
27 {
28  namespace Service
29  {
30 
31  class SceneCollectionResource;
32 
43  {
44  public:
45  typedef std::shared_ptr< SceneCollection > Ptr;
46 
47  private:
48  SceneCollection(const std::shared_ptr< SceneCollectionResource >&);
49  friend class SceneList;
50 
51  public:
52 
66  Scene::Ptr addNewScene(const std::string& sceneName);
67 
73  std::unordered_map< std::string, Scene::Ptr > getScenes() const;
74 
85  Scene::Ptr getScene(const std::string& sceneName) const;
86 
92  void setName(const std::string& name);
93 
99  std::string getName() const;
100 
107  std::string getId() const;
108 
109  private:
110  std::shared_ptr< SceneCollectionResource > m_sceneCollectionResource;
111 
112  };
113  } /* namespace Service */
114 } /* namespace OIC */
115 
116 #endif /* SM_SCENECOLLECTION_H_ */
117 
Scene::Ptr getScene(const std::string &sceneName) const
Gets a Scene instance with a specific Scene's name.
std::string getName() const
Gets a name attribute from SceneCollection resource.
SceneCollection class is an interface class to manage SceneCollection resource.
Definition: SceneCollection.h:42
SceneList class is an interface class to manage SceneList resource.
Definition: SceneList.h:41
std::string getId() const
Gets a Id attribute of SceneCollection resource.
std::unordered_map< std::string, Scene::Ptr > getScenes() const
Gets all Scene instances from SceneCollection resource.
std::shared_ptr< Scene > Ptr
Definition: Scene.h:46
Scene::Ptr addNewScene(const std::string &sceneName)
Adds new Scene instance to SceneCollection resource.
std::shared_ptr< SceneCollection > Ptr
Definition: SceneCollection.h:45
void setName(const std::string &name)
Sets a name attribute of SceneCollection resource.