Skip to content

Commit 6726451

Browse files
committed
Manage widget not found
1 parent e366b3f commit 6726451

4 files changed

Lines changed: 340 additions & 341 deletions

File tree

sources/server/database/IWidgetRequester.h

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
#include "entities/Entities.h"
44

55

6-
namespace database {
7-
6+
namespace database
7+
{
88
class IWidgetRequester
99
{
1010
public:
11+
virtual ~IWidgetRequester() = default;
12+
1113
//--------------------------------------------------------------
1214
/// \brief Add new widget
1315
/// \param [in] newWidget New widget informations
1416
/// \return widgetId generated by the database
1517
/// \throw shared::exception::CEmptyResult if fails
1618
//--------------------------------------------------------------
17-
virtual int addWidget(const entities::CWidget & newWidget) = 0;
19+
virtual int addWidget(const entities::CWidget& newWidget) = 0;
1820

1921
//--------------------------------------------------------------
2022
/// \brief Get widget informations
@@ -27,39 +29,43 @@ namespace database {
2729
/// \brief List all widgets
2830
/// \return List of registered widgets
2931
//--------------------------------------------------------------
30-
virtual std::vector<boost::shared_ptr<entities::CWidget> > getWidgets() = 0;
32+
virtual std::vector<boost::shared_ptr<entities::CWidget>> getWidgets() = 0;
3133

3234
//--------------------------------------------------------------
3335
/// \brief List all widgets instanciated in a page
3436
/// \param [in] pageId page Id
3537
/// \return List of registered widgets
3638
//--------------------------------------------------------------
37-
virtual std::vector<boost::shared_ptr<entities::CWidget> > getWidgetsForPage(int pageId) = 0;
38-
39+
virtual std::vector<boost::shared_ptr<entities::CWidget>> getWidgetsForPage(int pageId) = 0;
40+
3941
//--------------------------------------------------------------
4042
/// \brief Update widget informations
4143
/// \param [in] widgetId Widget Id
4244
/// \param [in] newConfiguration New configuration
4345
/// \throw shared::exception::CEmptyResult if fails
4446
//--------------------------------------------------------------
45-
virtual void updateWidgetConfiguration(int widgetId, const std::string& newConfiguration) = 0;
47+
virtual void updateWidgetConfiguration(int widgetId,
48+
const std::string& newConfiguration) = 0;
4649

4750
//--------------------------------------------------------------
4851
/// \brief Update widget size
4952
/// \param [in] widgetId Widget Id
5053
/// \param [in] sizeX the size X
51-
/// \param [in] sizeX the size Y
54+
/// \param [in] sizeY the size Y
5255
/// \throw shared::exception::CEmptyResult if fails
5356
//--------------------------------------------------------------
54-
virtual void updateWidgetSize(int widgetId, int sizeX, int sizeY) = 0;
55-
57+
virtual void updateWidgetSize(int widgetId,
58+
int sizeX,
59+
int sizeY) = 0;
60+
5661
//--------------------------------------------------------------
5762
/// \brief Update widget
5863
/// \param [in] widget The widget to update (the id must be filled)
5964
/// \param [in] createIfNotExists if true the widget will be created if it do not already exist in db
6065
/// \throw shared::exception::CEmptyResult if fails
6166
//--------------------------------------------------------------
62-
virtual void updateWidget(const entities::CWidget & widget, bool createIfNotExists) = 0;
67+
virtual void updateWidget(const entities::CWidget& widget,
68+
bool createIfNotExists) = 0;
6369

6470
//--------------------------------------------------------------
6571
/// \brief Remove widget
@@ -70,7 +76,7 @@ namespace database {
7076

7177
//--------------------------------------------------------------
7278
/// \brief Remove all widgets conained in a page
73-
/// \param [in] widgetId the page id
79+
/// \param [in] pageId the page id
7480
/// \throw shared::exception::CEmptyResult if fails
7581
//--------------------------------------------------------------
7682
virtual void removeWidgetsInPage(int pageId) = 0;
@@ -80,13 +86,5 @@ namespace database {
8086
/// \throw shared::exception::CEmptyResult if fails
8187
//--------------------------------------------------------------
8288
virtual void removeAllWidgets() = 0;
83-
84-
//--------------------------------------------------------------
85-
/// \brief Destructor
86-
//--------------------------------------------------------------
87-
virtual ~IWidgetRequester()
88-
{
89-
}
9089
};
91-
9290
} //namespace database

0 commit comments

Comments
 (0)