// actionsList.InvokeAll();
#include <pthread.h>
-#include <list>
+#include <vector>
#include <functional>
// Generalized actor type - a method of some class with one argument
// A list of an actions
// All methods are thread-safe
-class ACTIONS_LIST : private std::list<BASE_ACTION *>
+class ACTIONS_LIST : private std::vector<BASE_ACTION *>
{
public:
// Just a typedef for parent class
- typedef std::list<BASE_ACTION *> parent;
+ typedef std::vector<BASE_ACTION *> parent;
// Initialize mutex
ACTIONS_LIST();
STG_LOCKER lock(&mutex);
parent::iterator it(parent::begin());
- while (it != parent::end())
+ while (it != parent::end())
{
delete *it++;
}
inline
ACTIONS_LIST::parent::iterator ACTIONS_LIST::begin()
-{
+{
STG_LOCKER lock(&mutex);
return parent::begin();
}
inline
ACTIONS_LIST::parent::iterator ACTIONS_LIST::end()
-{
+{
STG_LOCKER lock(&mutex);
return parent::end();
}
inline
ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::begin() const
-{
+{
STG_LOCKER lock(&mutex);
return parent::begin();
}
inline
ACTIONS_LIST::parent::const_iterator ACTIONS_LIST::end() const
-{
+{
STG_LOCKER lock(&mutex);
return parent::end();
}