UniSet  2.6.0
UProxyObject.h
1 /*
2  * Copyright (c) 2015 Pavel Vainerman.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as
6  * published by the Free Software Foundation, version 2.1.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Lesser Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 // -------------------------------------------------------------------------
17 #ifndef UProxyObject_H_
18 #define UProxyObject_H_
19 // --------------------------------------------------------------------------
20 #include <memory>
21 #include "Configuration.h"
22 #include "UExceptions.h"
23 #include "UTypes.h"
24 // --------------------------------------------------------------------------
25 class UProxyObject_impl; // PIMPL
26 // --------------------------------------------------------------------------
42 {
43  public:
44  UProxyObject( const std::string& name ) throw(UException);
45  UProxyObject( long id ) throw(UException);
46  ~UProxyObject();
47 
49  void addToAsk( long id ) throw(UException);
50 
51  long getValue( long id ) throw(UException);
52  float getFloatValue( long id ) throw(UException);
53 
55  void setValue( long id, long val ) throw(UException);
56 
58  bool askIsOK();
59 
61  bool reaskSensors();
62 
66  bool updateValues();
67 
69  bool smIsOK();
70 
71  protected:
72  void init( long id ) throw( UException );
73 
74  private:
75  UProxyObject()throw(UException);
76 
77  std::shared_ptr<UProxyObject_impl> uobj;
78 };
79 //---------------------------------------------------------------------------
80 #endif
81 //---------------------------------------------------------------------------
bool reaskSensors()
Definition: UProxyObject.cc:129
void addToAsk(long id)
Definition: UProxyObject.cc:149
Definition: UProxyObject.h:41
void setValue(long id, long val)
Definition: UProxyObject.cc:119
bool updateValues()
Definition: UProxyObject.cc:134
Definition: UProxyObject.cc:29
bool askIsOK()
Definition: UProxyObject.cc:124
bool smIsOK()
Definition: UProxyObject.cc:139
Definition: UExceptions.h:20