Commit 1b8e0075 authored by Pavel Vainerman's avatar Pavel Vainerman

Рефаторинг: очередная расстановка const

parent 97c81e52
...@@ -26,7 +26,7 @@ namespace uniset ...@@ -26,7 +26,7 @@ namespace uniset
const Element::ElementID Element::DefaultElementID = "?id?"; const Element::ElementID Element::DefaultElementID = "?id?";
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
void Element::addChildOut( std::shared_ptr<Element> el, size_t num ) void Element::addChildOut( std::shared_ptr<Element>& el, size_t num )
{ {
if( el.get() == this ) if( el.get() == this )
{ {
...@@ -38,7 +38,7 @@ namespace uniset ...@@ -38,7 +38,7 @@ namespace uniset
for( const auto& it : outs ) for( const auto& it : outs )
{ {
if( it.el == el ) if( it.el.get() == el.get() )
{ {
ostringstream msg; ostringstream msg;
msg << "(" << myid << "):" << el->getId() << " уже есть в списке дочерних(такое соединение уже есть)..."; msg << "(" << myid << "):" << el->getId() << " уже есть в списке дочерних(такое соединение уже есть)...";
...@@ -59,11 +59,11 @@ namespace uniset ...@@ -59,11 +59,11 @@ namespace uniset
outs.emplace_front(el, num); outs.emplace_front(el, num);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
void Element::delChildOut( std::shared_ptr<Element> el ) void Element::delChildOut( std::shared_ptr<Element>& el )
{ {
for( auto it = outs.begin(); it != outs.end(); ++it ) for( auto it = outs.begin(); it != outs.end(); ++it )
{ {
if( it->el == el ) if( it->el.get() == el.get() )
{ {
outs.erase(it); outs.erase(it);
return; return;
...@@ -135,12 +135,12 @@ namespace uniset ...@@ -135,12 +135,12 @@ namespace uniset
return ins.size(); return ins.size();
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
ostream& operator<<( ostream& os, Element& el ) ostream& operator<<( ostream& os, const Element& el )
{ {
return os << "[" << el.getType() << "]" << el.getId(); return os << "[" << el.getType() << "]" << el.getId();
} }
ostream& operator<<( ostream& os, std::shared_ptr<Element> el ) ostream& operator<<( ostream& os, const std::shared_ptr<Element>& el )
{ {
if( el ) if( el )
return os << (*(el.get())); return os << (*(el.get()));
......
...@@ -72,16 +72,16 @@ namespace uniset ...@@ -72,16 +72,16 @@ namespace uniset
virtual std::shared_ptr<Element> find( const ElementID& id ); virtual std::shared_ptr<Element> find( const ElementID& id );
virtual void addChildOut( std::shared_ptr<Element> el, size_t in_num ); virtual void addChildOut( std::shared_ptr<Element>& el, size_t in_num );
virtual void delChildOut( std::shared_ptr<Element> el ); virtual void delChildOut( std::shared_ptr<Element>& el );
size_t outCount() const; size_t outCount() const;
virtual void addInput( size_t num, long value = 0 ); virtual void addInput( size_t num, long value = 0 );
virtual void delInput( size_t num ); virtual void delInput( size_t num );
size_t inCount() const; size_t inCount() const;
friend std::ostream& operator<<(std::ostream& os, Element& el ); friend std::ostream& operator<<(std::ostream& os, const Element& el );
friend std::ostream& operator<<(std::ostream& os, std::shared_ptr<Element> el ); friend std::ostream& operator<<(std::ostream& os, const std::shared_ptr<Element>& el );
protected: protected:
Element(): myid(DefaultElementID) {}; // нельзя создать элемент без id Element(): myid(DefaultElementID) {}; // нельзя создать элемент без id
......
...@@ -138,7 +138,7 @@ namespace uniset ...@@ -138,7 +138,7 @@ namespace uniset
return el; return el;
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
void Schema::remove( std::shared_ptr<Element> el ) void Schema::remove( std::shared_ptr<Element>& el )
{ {
for( auto && it = emap.begin(); it != emap.end(); ++it ) for( auto && it = emap.begin(); it != emap.end(); ++it )
{ {
......
...@@ -33,7 +33,7 @@ namespace uniset ...@@ -33,7 +33,7 @@ namespace uniset
std::shared_ptr<Element> manage( std::shared_ptr<Element> el ); std::shared_ptr<Element> manage( std::shared_ptr<Element> el );
void remove( std::shared_ptr<Element> el ); void remove( std::shared_ptr<Element>& el );
void link( Element::ElementID rootID, Element::ElementID childID, int numIn ); void link( Element::ElementID rootID, Element::ElementID childID, int numIn );
void unlink( Element::ElementID rootID, Element::ElementID childID ); void unlink( Element::ElementID rootID, Element::ElementID childID );
......
...@@ -118,26 +118,22 @@ namespace uniset ...@@ -118,26 +118,22 @@ namespace uniset
*/ */
timeout_t checkTimers( UniSetObject* obj ); timeout_t checkTimers( UniSetObject* obj );
/*! получить текущее время ожидания */
//inline timeout_t getSleepTimeMS(){ return sleepTime; }
/*! получить время на которое установлен таймер timerid /*! получить время на которое установлен таймер timerid
* \param timerid - идентификатор таймера * \param timerid - идентификатор таймера
* \return 0 - если таймер не найден, время (мсек) если таймер есть. * \return 0 - если таймер не найден, время (мсек) если таймер есть.
*/ */
timeout_t getTimeInterval( uniset::TimerId timerid ); timeout_t getTimeInterval( uniset::TimerId timerid ) const;
/*! получить оставшееся время для таймера timerid /*! получить оставшееся время для таймера timerid
* \param timerid - идентификатор таймера * \param timerid - идентификатор таймера
* \return 0 - если таймер не найден, время (мсек) если таймер есть. * \return 0 - если таймер не найден, время (мсек) если таймер есть.
*/ */
timeout_t getTimeLeft( uniset::TimerId timerid ); timeout_t getTimeLeft( uniset::TimerId timerid ) const;
protected: protected:
/*! пользовательская функция для вывода названия таймера */ /*! пользовательская функция для вывода названия таймера */
virtual std::string getTimerName( int id ); virtual std::string getTimerName( int id ) const;
/*! Информация о таймере */ /*! Информация о таймере */
struct TimerInfo struct TimerInfo
...@@ -159,7 +155,7 @@ namespace uniset ...@@ -159,7 +155,7 @@ namespace uniset
} }
uniset::TimerId id = { 0 }; /*!< идентификатор таймера */ uniset::TimerId id = { 0 }; /*!< идентификатор таймера */
timeout_t curTimeMS = { 0 }; /*!< остаток времени */ timeout_t curTimeMS = { 0 }; /*!< остаток времени */
uniset::Message::Priority priority = { uniset::Message::High }; /*!< приоритет посылаемого сообщения */ uniset::Message::Priority priority = { uniset::Message::High }; /*!< приоритет посылаемого сообщения */
/*! /*!
...@@ -195,13 +191,13 @@ namespace uniset ...@@ -195,13 +191,13 @@ namespace uniset
timeout_t sleepTime; /*!< текущее время ожидания */ timeout_t sleepTime; /*!< текущее время ожидания */
TimersList getTimersList(); TimersList getTimersList() const;
private: private:
TimersList tlst; TimersList tlst;
/*! замок для блокирования совместного доступа к cписку таймеров */ /*! замок для блокирования совместного доступа к cписку таймеров */
uniset::uniset_rwmutex lstMutex; mutable uniset::uniset_rwmutex lstMutex;
PassiveTimer tmLast; PassiveTimer tmLast;
}; };
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
......
...@@ -35,8 +35,7 @@ namespace uniset ...@@ -35,8 +35,7 @@ namespace uniset
namespace ORepHelpers namespace ORepHelpers
{ {
//! Получение ссылки на корень репозитория //! Получение ссылки на корень репозитория
CosNaming::NamingContext_ptr getRootNamingContext( const CORBA::ORB_ptr orb, CosNaming::NamingContext_ptr getRootNamingContext( const CORBA::ORB_ptr orb, const std::string& nsName );
const std::string& nsName, int timeOutSec = 2);
//! Получение контекста по заданному имени //! Получение контекста по заданному имени
CosNaming::NamingContext_ptr getContext(const std::string& cname, int argc, CosNaming::NamingContext_ptr getContext(const std::string& cname, int argc,
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
*/ */
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
/*! \file /*! \file
* \author Vitaly Lipatov * \author Vitaly Lipatov, Pavel Vainerman
*/ */
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
#ifndef ObjcetIndex_H_ #ifndef ObjcetIndex_H_
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
namespace uniset namespace uniset
{ {
/*! Базовый интерфейс для работы с преобразованиями ObjectID <--> ObjectName */
class ObjectIndex class ObjectIndex
{ {
public: public:
......
...@@ -31,9 +31,13 @@ ...@@ -31,9 +31,13 @@
namespace uniset namespace uniset
{ {
/*! /*!
\todo Проверить функции этого класса на повторную входимость *
\bug При обращении к objectsMap[0].textName срабатывает исключение(видимо какое-то из std). * \todo Проверить функции этого класса на повторную входимость
Требуется дополнительное изучение. * \bug При обращении к objectsMap[0].textName срабатывает исключение(видимо какое-то из std).
* Требуется дополнительное изучение.
*
* \deprecated Этот класс нужен для совместимости с очень древними проектами.
* Где список объектов объявлялся статическим массивом
*/ */
class ObjectIndex_Array: class ObjectIndex_Array:
public ObjectIndex public ObjectIndex
......
...@@ -31,7 +31,10 @@ ...@@ -31,7 +31,10 @@
namespace uniset namespace uniset
{ {
/*! \todo Проверить функции этого класса на повторную входимость */ /*! реализация интерфейса ObjectIndex на основе xml-файла, с автоматическим назначением id объектам
*
* \todo Проверить функции этого класса на повторную входимость
*/
class ObjectIndex_XML: class ObjectIndex_XML:
public ObjectIndex public ObjectIndex
{ {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
namespace uniset namespace uniset
{ {
/*! реализация интерфейса ObjectIndex на основе xml-файла, в котором прописаны id объектов */
class ObjectIndex_idXML: class ObjectIndex_idXML:
public uniset::ObjectIndex public uniset::ObjectIndex
{ {
......
...@@ -37,9 +37,9 @@ namespace uniset ...@@ -37,9 +37,9 @@ namespace uniset
/*! \class ObjectRepository /*! \class ObjectRepository
* \par * \par
* ... а здесь идет кратенькое описание... (коротенько минут на 40!...) * Работа с CORBA-репозиторием (NameService).
* *
* \note Репозиторий работает только, с локальным репозиторием * \note Репозиторий работает только, с локальным репозиторием
* \todo получение списка начиная с элемента номер N. * \todo получение списка начиная с элемента номер N.
*/ */
class ObjectRepository class ObjectRepository
...@@ -54,16 +54,19 @@ namespace uniset ...@@ -54,16 +54,19 @@ namespace uniset
@{ */ @{ */
//! Функция регистрации объекта по имени с указанием секции //! Функция регистрации объекта по имени с указанием секции
void registration(const std::string& name, const uniset::ObjectPtr oRef, const std::string& section, bool force = false) const void registration(const std::string& name, const uniset::ObjectPtr oRef, const std::string& section, bool force = false) const
throw(uniset::ORepFailed, uniset::ObjectNameAlready, uniset::InvalidObjectName, uniset::NameNotFound); throw(uniset::ORepFailed, uniset::ObjectNameAlready, uniset::InvalidObjectName, uniset::NameNotFound);
//! Функция регистрации объекта по полному имени. //! Функция регистрации объекта по полному имени.
void registration(const std::string& fullName, const uniset::ObjectPtr oRef, bool force = false) const void registration(const std::string& fullName, const uniset::ObjectPtr oRef, bool force = false) const
throw(uniset::ORepFailed, uniset::ObjectNameAlready, uniset::InvalidObjectName, uniset::NameNotFound); throw(uniset::ORepFailed, uniset::ObjectNameAlready, uniset::InvalidObjectName, uniset::NameNotFound);
//! Удаление записи об объекте name в секции section //! Удаление записи об объекте name в секции section
void unregistration(const std::string& name, const std::string& section) const throw(uniset::ORepFailed, uniset::NameNotFound); void unregistration(const std::string& name, const std::string& section) const
throw(uniset::ORepFailed, uniset::NameNotFound);
//! Удаление записи об объекте по полному имени //! Удаление записи об объекте по полному имени
void unregistration(const std::string& fullName) const throw(uniset::ORepFailed, uniset::NameNotFound); void unregistration(const std::string& fullName) const
throw(uniset::ORepFailed, uniset::NameNotFound);
// @} // @}
// end of ORepGroup // end of ORepGroup
...@@ -95,19 +98,21 @@ namespace uniset ...@@ -95,19 +98,21 @@ namespace uniset
// ------------------------------------------------------------------- // -------------------------------------------------------------------
//! Создание секции //! Создание секции
bool createSection( const std::string& name, const std::string& in_section )throw(uniset::ORepFailed, uniset::InvalidObjectName); bool createSection( const std::string& name, const std::string& in_section ) const
throw(uniset::ORepFailed, uniset::InvalidObjectName);
/*! Создание секции по полному имени */ /*! Создание секции по полному имени */
bool createSectionF(const std::string& fullName)throw(uniset::ORepFailed, uniset::InvalidObjectName); bool createSectionF(const std::string& fullName) const
throw(uniset::ORepFailed, uniset::InvalidObjectName);
//! Функция создания секции в корневом 'каталоге' //! Функция создания секции в корневом 'каталоге'
bool createRootSection(const std::string& name); bool createRootSection( const std::string& name ) const;
//! Функция удаления секции //! Функция удаления секции
bool removeSection(const std::string& fullName, bool recursive = false); bool removeSection(const std::string& fullName, bool recursive = false) const;
//! Функция переименования секции //! Функция переименования секции
bool renameSection(const std::string& newName, const std::string& fullName); bool renameSection(const std::string& newName, const std::string& fullName) const;
/*! Функция выводящая на экран список всех объектов расположенных в данной секции */ /*! Функция выводящая на экран список всех объектов расположенных в данной секции */
void printSection(const std::string& fullName) const; void printSection(const std::string& fullName) const;
...@@ -124,7 +129,7 @@ namespace uniset ...@@ -124,7 +129,7 @@ namespace uniset
bool list(const std::string& section, uniset::ListObjectName* ls, size_t how_many, ObjectType type) const; bool list(const std::string& section, uniset::ListObjectName* ls, size_t how_many, ObjectType type) const;
/*! Создание нового контекста(секции) */ /*! Создание нового контекста(секции) */
bool createContext( const std::string& cname, CosNaming::NamingContext_ptr ctx); bool createContext( const std::string& cname, CosNaming::NamingContext_ptr ctx) const;
private: private:
bool init() const; bool init() const;
......
...@@ -99,7 +99,7 @@ namespace uniset ...@@ -99,7 +99,7 @@ namespace uniset
OmniThreadCreator( const std::shared_ptr<ThreadMaster>& m, Action a, bool undetached = false ); OmniThreadCreator( const std::shared_ptr<ThreadMaster>& m, Action a, bool undetached = false );
~OmniThreadCreator() {} ~OmniThreadCreator() {}
inline bool isRunning() inline bool isRunning() const
{ {
return state() == omni_thread::STATE_RUNNING; return state() == omni_thread::STATE_RUNNING;
} }
......
...@@ -114,7 +114,7 @@ namespace uniset ...@@ -114,7 +114,7 @@ namespace uniset
protected: protected:
void check(); void check();
InputMap inputs; // список входов InputMap inputs; // список входов
bool out; bool out = { false };
Caller* cal; Caller* cal;
Action act; Action act;
}; };
......
...@@ -113,7 +113,7 @@ namespace uniset ...@@ -113,7 +113,7 @@ namespace uniset
void check(); void check();
InputMap inputs; // список входов InputMap inputs; // список входов
bool out; bool out = { false };
Caller* cal; Caller* cal;
Action act; Action act;
}; };
......
...@@ -137,7 +137,7 @@ namespace uniset ...@@ -137,7 +137,7 @@ namespace uniset
// --------------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------------
/*! \param orb - ссылка на ORB */ /*! \param orb - ссылка на ORB */
CosNaming::NamingContext_ptr getRootNamingContext(const CORBA::ORB_ptr orb, const string& nsName, int timeoutSec) CosNaming::NamingContext_ptr getRootNamingContext( const CORBA::ORB_ptr orb, const string& nsName )
{ {
CosNaming::NamingContext_var rootContext; CosNaming::NamingContext_var rootContext;
......
...@@ -449,7 +449,8 @@ bool ObjectRepository::isExist( const ObjectPtr& oref ) const ...@@ -449,7 +449,8 @@ bool ObjectRepository::isExist( const ObjectPtr& oref ) const
* \param section - полное имя секции начиная с Root. * \param section - полное имя секции начиная с Root.
* \exception ORepFailed - генерируется если произошла при получении доступа к секции * \exception ORepFailed - генерируется если произошла при получении доступа к секции
*/ */
bool ObjectRepository::createSection(const string& name, const string& in_section)throw(ORepFailed, InvalidObjectName) bool ObjectRepository::createSection(const string& name, const string& in_section) const
throw(ORepFailed, InvalidObjectName)
{ {
char bad = ORepHelpers::checkBadSymbols(name); char bad = ORepHelpers::checkBadSymbols(name);
...@@ -471,7 +472,7 @@ bool ObjectRepository::createSection(const string& name, const string& in_sectio ...@@ -471,7 +472,7 @@ bool ObjectRepository::createSection(const string& name, const string& in_sectio
int argc(uconf->getArgc()); int argc(uconf->getArgc());
const char* const* argv(uconf->getArgv()); const char* const* argv(uconf->getArgv());
CosNaming::NamingContext_var ctx = ORepHelpers::getContext(in_section, argc, argv, uconf->getNSName() ); CosNaming::NamingContext_var ctx = ORepHelpers::getContext(in_section, argc, argv, nsName );
return createContext( name, ctx.in() ); return createContext( name, ctx.in() );
} }
// ------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------
...@@ -479,7 +480,7 @@ bool ObjectRepository::createSection(const string& name, const string& in_sectio ...@@ -479,7 +480,7 @@ bool ObjectRepository::createSection(const string& name, const string& in_sectio
* \param fullName - полное имя создаваемой секции * \param fullName - полное имя создаваемой секции
* \exception ORepFailed - генерируется если произошла при получении доступа к секции * \exception ORepFailed - генерируется если произошла при получении доступа к секции
*/ */
bool ObjectRepository::createSectionF( const string& fullName )throw(ORepFailed, InvalidObjectName) bool ObjectRepository::createSectionF( const string& fullName ) const throw(ORepFailed, InvalidObjectName)
{ {
string name(ObjectIndex::getBaseName(fullName)); string name(ObjectIndex::getBaseName(fullName));
string sec(ORepHelpers::getSectionName(fullName)); string sec(ORepHelpers::getSectionName(fullName));
...@@ -498,14 +499,14 @@ bool ObjectRepository::createSectionF( const string& fullName )throw(ORepFailed, ...@@ -498,14 +499,14 @@ bool ObjectRepository::createSectionF( const string& fullName )throw(ORepFailed,
} }
// --------------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------------
bool ObjectRepository::createRootSection( const string& name ) bool ObjectRepository::createRootSection( const string& name ) const
{ {
CORBA::ORB_var orb = uconf->getORB(); CORBA::ORB_var orb = uconf->getORB();
CosNaming::NamingContext_var ctx = ORepHelpers::getRootNamingContext(orb, uconf->getNSName()); CosNaming::NamingContext_var ctx = ORepHelpers::getRootNamingContext(orb, nsName);
return createContext(name, ctx); return createContext(name, ctx);
} }
// ----------------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------------
bool ObjectRepository::createContext( const string& cname, CosNaming::NamingContext_ptr ctx ) bool ObjectRepository::createContext( const string& cname, CosNaming::NamingContext_ptr ctx ) const
{ {
CosNaming::Name_var nc = omniURI::stringToName(cname.c_str()); CosNaming::Name_var nc = omniURI::stringToName(cname.c_str());
...@@ -591,12 +592,12 @@ void ObjectRepository::printSection( const string& fullName ) const ...@@ -591,12 +592,12 @@ void ObjectRepository::printSection( const string& fullName ) const
* \param recursive - удлаять рекурсивно все секции или возвращать не удалять и ошибку ( временно ) * \param recursive - удлаять рекурсивно все секции или возвращать не удалять и ошибку ( временно )
* \warning Функция вынимает только первые 1000 объектов, остальные игнорируются... * \warning Функция вынимает только первые 1000 объектов, остальные игнорируются...
*/ */
bool ObjectRepository::removeSection(const string& fullName, bool recursive) bool ObjectRepository::removeSection( const string& fullName, bool recursive ) const
{ {
// string name = getName(fullName.c_str(),'/'); // string name = getName(fullName.c_str(),'/');
// string sec = getSectionName(fullName.c_str(),'/'); // string sec = getSectionName(fullName.c_str(),'/');
// CosNaming::NamingContext_var ctx = getContext(sec, argc, argv); // CosNaming::NamingContext_var ctx = getContext(sec, argc, argv);
unsigned int how_many = 1000; size_t how_many = 1000;
CosNaming::NamingContext_var ctx; CosNaming::NamingContext_var ctx;
try try
...@@ -626,7 +627,7 @@ bool ObjectRepository::removeSection(const string& fullName, bool recursive) ...@@ -626,7 +627,7 @@ bool ObjectRepository::removeSection(const string& fullName, bool recursive)
bool rem = true; // удалять или нет bool rem = true; // удалять или нет
for(unsigned int i = 0; i < how_many; i++) for( size_t i = 0; i < how_many; i++)
{ {
if( bl[i].binding_type == CosNaming::nobject) if( bl[i].binding_type == CosNaming::nobject)
...@@ -700,7 +701,7 @@ bool ObjectRepository::removeSection(const string& fullName, bool recursive) ...@@ -700,7 +701,7 @@ bool ObjectRepository::removeSection(const string& fullName, bool recursive)
* \param newFName - полное имя новой секции * \param newFName - полное имя новой секции
* \param oldFName - полное имя удаляемрй секции * \param oldFName - полное имя удаляемрй секции
*/ */
bool ObjectRepository::renameSection( const string& newFName, const string& oldFName ) bool ObjectRepository::renameSection( const string& newFName, const string& oldFName ) const
{ {
string newName(ObjectIndex::getBaseName(newFName)); string newName(ObjectIndex::getBaseName(newFName));
string oldName(ObjectIndex::getBaseName(oldFName)); string oldName(ObjectIndex::getBaseName(oldFName));
......
...@@ -123,7 +123,7 @@ timeout_t LT_Object::checkTimers( UniSetObject* obj ) ...@@ -123,7 +123,7 @@ timeout_t LT_Object::checkTimers( UniSetObject* obj )
return sleepTime; return sleepTime;
} }
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
timeout_t LT_Object::getTimeInterval( TimerId timerid ) timeout_t LT_Object::getTimeInterval( TimerId timerid ) const
{ {
// lock // lock
uniset_rwmutex_rlock lock(lstMutex); uniset_rwmutex_rlock lock(lstMutex);
...@@ -137,7 +137,7 @@ timeout_t LT_Object::getTimeInterval( TimerId timerid ) ...@@ -137,7 +137,7 @@ timeout_t LT_Object::getTimeInterval( TimerId timerid )
return 0; return 0;
} }
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
timeout_t LT_Object::getTimeLeft( TimerId timerid ) timeout_t LT_Object::getTimeLeft( TimerId timerid ) const
{ {
// lock // lock
uniset_rwmutex_rlock lock(lstMutex); uniset_rwmutex_rlock lock(lstMutex);
...@@ -151,14 +151,14 @@ timeout_t LT_Object::getTimeLeft( TimerId timerid ) ...@@ -151,14 +151,14 @@ timeout_t LT_Object::getTimeLeft( TimerId timerid )
return 0; return 0;
} }
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
LT_Object::TimersList LT_Object::getTimersList() LT_Object::TimersList LT_Object::getTimersList() const
{ {
uniset_rwmutex_rlock l(lstMutex); uniset_rwmutex_rlock l(lstMutex);
TimersList lst(tlst); TimersList lst(tlst);
return lst; return lst;
} }
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
string LT_Object::getTimerName(int id) string LT_Object::getTimerName( int id ) const
{ {
return ""; return "";
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment