Code_TYMPAN  4.4.0
Industrial site acoustic simulation
OSizeManager.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
14  */
15 
16 /*
17  *
18  */
19 
20 #ifndef __O_SIZEMANAGER__
21 #define __O_SIZEMANAGER__
22 
23 #include "Tympan/core/smartptr.h"
24 
25 // Smart pointer sur OSizeManager.
26 class OSizeManager;
28 
37 class OSizeManager : public IRefCount
38 {
39 public:
43  ~OSizeManager();
44 
48  static LPOSizeManager get();
49 
53  inline void setWidth(unsigned int width)
54  {
55  _width = width;
56  }
57 
61  inline void setHeight(unsigned int height)
62  {
63  _height = height;
64  }
65 
69  inline unsigned int getWidth() const
70  {
71  return _width;
72  }
73 
77  inline unsigned int getHeight() const
78  {
79  return _height;
80  }
81 
82 private:
83  // Instance unique.
85 
89  OSizeManager();
90 
91  // Copy prohibited
94 
95  // Largeur
96  unsigned int _width;
97 
98  // Hauteur
99  unsigned int _height;
100 };
101 
102 #endif // __O_SIZEMANAGER__
SmartPtr< OSizeManager > LPOSizeManager
Definition: OSizeManager.h:26
OSizeManager(const OSizeManager &)
unsigned int _width
Definition: OSizeManager.h:96
void setWidth(unsigned int width)
Definition: OSizeManager.h:53
static LPOSizeManager _pInstance
Definition: OSizeManager.h:84
unsigned int getHeight() const
Definition: OSizeManager.h:77
void setHeight(unsigned int height)
Definition: OSizeManager.h:61
unsigned int _height
Definition: OSizeManager.h:99
static LPOSizeManager get()
OSizeManager & operator=(const OSizeManager &)
unsigned int getWidth() const
Definition: OSizeManager.h:69