RDK Documentation (Open Sourced RDK Components)
aspectRatio.hpp
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
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 /**
22  * @file aspectRatio.hpp
23  * @brief This file defines AspectRatio class for managing aspect ratio types.
24  */
25 
26 
27 /**
28 * @defgroup devicesettings
29 * @{
30 * @defgroup ds
31 * @{
32 **/
33 
34 
35 #ifndef _DS_ASPECTRATIO_HPP_
36 #define _DS_ASPECTRATIO_HPP_
37 
38 #include "dsConstant.hpp"
39 #include <string>
40 
41 namespace device {
42 
43 
44 /**
45  * @class AspectRatio
46  * @brief This class extends DSConstant to implement AspectRatio. It manages
47  * the aspect ratios of the videos.
48  * @ingroup devicesettingsclass
49  */
50 class AspectRatio : public DSConstant {
51 
52 public:
53  static const int k4x3; //!< Indicates 4x3 aspect ratio.
54  static const int k16x9; //!< Indicates 16x9 aspect ratio.
55  static const int kMax; //!< Indicates maximum number of aspect ratios supported.
56 
57  static const AspectRatio & getInstance(int id);
58  static const AspectRatio & getInstance(const std::string &name);
59 
60  AspectRatio(int id);
61  virtual ~AspectRatio();
62 
63 };
64 
65 }
66 
67 #endif /* _DS_ASPECTRATIO_HPP_ */
68 
69 
70 /** @} */
71 /** @} */
device::AspectRatio::AspectRatio
AspectRatio(int id)
This function is a parameterised constructor. It initializes the instance with the specified id and a...
Definition: aspectRatio.cpp:120
dsConstant.hpp
This file defines DSConstant class which is inherited by most of the device settings classes.
device::DSConstant
This class is used to store and manage the names and id's. It is derived by many classes like VideoRe...
Definition: dsConstant.hpp:52
device::AspectRatio::k16x9
static const int k16x9
Indicates 16x9 aspect ratio.
Definition: aspectRatio.hpp:54
device::AspectRatio::getInstance
static const AspectRatio & getInstance(int id)
This function gets the instance of the AspectRatio against the id specified, only if the id passed is...
Definition: aspectRatio.cpp:74
device::AspectRatio::k4x3
static const int k4x3
Indicates 4x3 aspect ratio.
Definition: aspectRatio.hpp:53
device::AspectRatio::kMax
static const int kMax
Indicates maximum number of aspect ratios supported.
Definition: aspectRatio.hpp:55
device::AspectRatio
This class extends DSConstant to implement AspectRatio. It manages the aspect ratios of the videos.
Definition: aspectRatio.hpp:50
device::AspectRatio::~AspectRatio
virtual ~AspectRatio()
This function is the default destructor of AspectRatio class.
Definition: aspectRatio.cpp:138