Adapt the AIL filter used to new ones
[profile/ivi/ico-uxf-homescreen.git] / lib / system-controller / CicoSCDisplay.cpp
1 /*
2  * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9
10 /*========================================================================*/
11 /**
12  *  @file   CicoSCDisplay.cpp
13  *
14  *  @brief  This file implementation of CicoSCDisplay class
15  */
16 /*========================================================================*/
17
18 #include <string>
19 #include <vector>
20 using namespace std;
21
22 #include "CicoSCDisplay.h"
23 #include "CicoSCLayer.h"
24 #include "CicoSCDisplayZone.h"
25 #include "CicoLog.h"
26
27 //--------------------------------------------------------------------------
28 /**
29  *  @brief  default constructor
30  */
31 //--------------------------------------------------------------------------
32 CicoSCDisplay::CicoSCDisplay()
33     : displayid(-1),
34       type(-1),
35       nodeid(-1),
36       displayno(-1),
37       width(-1),
38       height(-1),
39       pWidth(-1),
40       pHeight(-1),
41       orientation(ORIENTATION_HORIZONTAL),
42       name("")
43 {
44 }
45
46 //--------------------------------------------------------------------------
47 /**
48  *  @brief  destructor
49  */
50 //--------------------------------------------------------------------------
51 CicoSCDisplay::~CicoSCDisplay()
52 {
53 }
54
55 //--------------------------------------------------------------------------
56 /**
57  *  @brief  dump log this class member variables
58  */
59 //--------------------------------------------------------------------------
60 void
61 CicoSCDisplay::dump(void)
62 {
63     ICO_DBG("CicoSCDisplay: displayid=%d type=%d nodeid=%d displayno=%d "
64             "width=%d height=%d pWidth=%d pHeight=%d "
65             "orientation =%d name=%s",
66             displayid, type, nodeid, displayno, width, height,
67             pWidth, pHeight, orientation, name.c_str());
68  
69     {
70         vector<CicoSCLayer*>::iterator itr;
71         itr = layerList.begin();
72         for (; itr != layerList.end(); ++itr) {
73             (*itr)->dump();
74         }
75     }
76
77     {
78         std::map<unsigned int, CicoSCDisplayZone*>::iterator itr;
79         itr = zoneList.begin();
80         for (; itr != zoneList.end(); ++itr) {
81             itr->second->dump();
82         }
83     }
84 }
85
86 //--------------------------------------------------------------------------
87 /**
88  *  @brief  find CicoSCDisplayZone instance by fullname
89  */
90 //--------------------------------------------------------------------------
91 CicoSCDisplayZone*
92 CicoSCDisplay::findDisplayZonebyFullName(const string & fullname)
93 {
94 //    ICO_TRA("CicoSCDisplay:findDisplayZonebyFullName Enter"
95 //            "(fullname=%s)", fullname.c_str());
96  
97     std::map<unsigned int, CicoSCDisplayZone*>::iterator itr;
98     itr = zoneList.begin();
99     for (; itr != zoneList.end(); ++itr) {
100         if (itr->second->fullname == fullname) {
101 //            ICO_TRA("CicoSCDisplay:findDisplayZonebyFullName Leave(found)");
102             return itr->second;
103         }
104     }
105
106 //    ICO_TRA("CicoSCDisplay:findDisplayZonebyFullName Leave(not found)");
107     return NULL;
108 }
109 // vim:set expandtab ts=4 sw=4: