IoTivity C++ SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OIC::Service::SceneCollection Class Reference

SceneCollection class is an interface class to manage SceneCollection resource. More...

Public Types

typedef std::shared_ptr
< SceneCollection
Ptr
 

Public Member Functions

Scene::Ptr addNewScene (const std::string &sceneName)
 Adds new Scene instance to SceneCollection resource. More...
 
std::unordered_map
< std::string, Scene::Ptr
getScenes () const
 Gets all Scene instances from SceneCollection resource. More...
 
Scene::Ptr getScene (const std::string &sceneName) const
 Gets a Scene instance with a specific Scene's name. More...
 
void setName (const std::string &name)
 Sets a name attribute of SceneCollection resource. More...
 
std::string getName () const
 Gets a name attribute from SceneCollection resource. More...
 
std::string getId () const
 Gets a Id attribute of SceneCollection resource. More...
 

Friends

class SceneList
 

Detailed Description

SceneCollection class is an interface class to manage SceneCollection resource.

This class provides APIs to create a new Scene instance and retrieve all Scene instances created before. Besides, it provide APIs for retrieving and updating attribute values like name attribute

Member Typedef Documentation

Member Function Documentation

Scene::Ptr OIC::Service::SceneCollection::addNewScene ( const std::string &  sceneName)

Adds new Scene instance to SceneCollection resource.

Parameters
sceneNameA scene's name
Returns
A shared pointer of Scene instance
Exceptions
RCSInvalidParameterExceptionif scene name is empty
RCSInvalidParameterExceptionif scene name is dupltcated
Note
Scene instance is only produced by SceneCollection class
Scene's name must unique in one SceneCollection resource
std::string OIC::Service::SceneCollection::getId ( ) const

Gets a Id attribute of SceneCollection resource.

Returns
A SceneCollection resource's Id
std::string OIC::Service::SceneCollection::getName ( ) const

Gets a name attribute from SceneCollection resource.

Returns
A SceneCollection resource's name
Scene::Ptr OIC::Service::SceneCollection::getScene ( const std::string &  sceneName) const

Gets a Scene instance with a specific Scene's name.

Parameters
sceneNameA Scene's name
Returns
A shared pointer of Scene instance
Exceptions
RCSInvalidParameterExceptionif Scene's name does not exist in SceneCollection resource
std::unordered_map< std::string, Scene::Ptr > OIC::Service::SceneCollection::getScenes ( ) const

Gets all Scene instances from SceneCollection resource.

Returns
A unordered_map of shared pointers of Scene instances with a Scene's name
void OIC::Service::SceneCollection::setName ( const std::string &  name)

Sets a name attribute of SceneCollection resource.

Parameters
nameA SceneCollection resource's name

Friends And Related Function Documentation

friend class SceneList
friend

The documentation for this class was generated from the following file: