28 #include <unordered_map>
30 #include <omniORB4/CORBA.h>
31 #include "Exceptions.h"
32 #include "UniSetTypes.h"
33 #include "ObjectIndex.h"
34 #include "ObjectRepository.h"
35 #include "IOController_i.hh"
36 #include "MessageType.h"
37 #include "Configuration.h"
40 #define UI_THROW_EXCEPTIONS uniset::TimeOut,uniset::IOBadParam,uniset::ORepFailed
58 UInterface(
const uniset::ObjectId backid, CORBA::ORB_var orb = NULL,
const std::shared_ptr<uniset::ObjectIndex> oind =
nullptr );
116 UniversalIO::UIOCommand cmd,
117 long lowLimit,
long hiLimit,
bool invert =
false,
122 long lowLimit,
long hiLimit,
bool invert =
false,
135 UniversalIO::IOType getConfIOType(
const uniset::ObjectId id )
const noexcept;
155 IONotifyController_i::ThresholdsListSeq* getThresholdsList(
const uniset::ObjectId id,
174 return rep.
resolve( oind->getNameById(
id) );
190 bool waitWorking( const uniset::
ObjectId id,
int msec,
int pause = 3000,
199 return oind->getIdByName(name);
205 return oind->getNameById(
id);
208 inline uniset::ObjectId getNodeId(
const std::string& fullname )
const noexcept
210 return oind->getNodeId(fullname);
215 return oind->getTextName(
id);
220 inline const std::shared_ptr<uniset::ObjectIndex> getObjectIndex() noexcept
224 inline const std::shared_ptr<uniset::Configuration> getConf() noexcept
238 inline void setCacheMaxSize(
size_t newsize ) noexcept
240 rcache.setMaxSize(newsize);
248 MaxSize(maxsize), minCallCount(cleancount) {};
255 inline void setMaxSize(
size_t ms ) noexcept
265 bool clean() noexcept;
266 inline void clear() noexcept
275 Item(): ptr(NULL), ncall(0) {}
280 bool operator<(
const CacheOfResolve::Item& rhs )
const
282 return this->ncall > rhs.ncall;
286 typedef std::unordered_map<uniset::KeyType, Item> CacheMap;
287 mutable CacheMap mcache;
289 size_t MaxSize = { 20 };
290 size_t minCallCount = { 20 };
303 mutable CosNaming::NamingContext_var localctx;
304 mutable CORBA::ORB_var orb;
306 std::shared_ptr<uniset::ObjectIndex> oind;
307 std::shared_ptr<uniset::Configuration> uconf;