9 for (
size_t i = 0; i < rhs.
vector_.size(); ++i)
22 MADARA_GUARD_TYPE guard(mutex_);
24 for (
size_t i = 0; i < vector_.size(); ++i)
26 vector_[i]->modify_();
32 MADARA_GUARD_TYPE guard(mutex_);
34 std::stringstream result;
36 for (
size_t i = 0; i < vector_.size(); ++i)
38 result << vector_[i]->get_debug_info_() <<
"\n";
51 return get_debug_info();
65 "Collection::is_true: checking all containers for truth\n");
70 MADARA_GUARD_TYPE guard(mutex_);
72 for (
size_t i = 0; i < vector_.size(); ++i)
74 if (vector_[i]->is_false_())
83 "Collection::is_true: final result is %d\n", (
int)result);
#define madara_logger_log(loggering, level,...)
Fast version of the madara::logger::log method.
const ThreadSafeContext * context_
A thread-safe guard for a context or knowledge base.
This class is an abstract base class for all containers.
A collection of MADARA containers that can be used for aggregate operations on all containers in the ...
virtual std::string get_debug_info_(void)
Returns the type of the container along with name and any other useful information.
virtual bool is_false_(void) const
Polymorphic is false method which can be used to determine if at least one value in the container is ...
virtual BaseContainer * clone(void) const
Clones this container.
void modify(void)
Mark all values in the container as modified.
virtual ~Collection()
Destructor.
std::vector< BaseContainer * > vector_
The underlying collection of containers.
std::string get_debug_info(void)
Returns the type of the containers along with name and any other useful information.
virtual void modify_(void)
Polymorphic modify method used by collection containers.
bool is_false(void) const
Determines if the value of the collection is false.
bool is_true(void) const
Determines if all values in the collection are true.
virtual bool is_true_(void) const
Polymorphic is true method which can be used to determine if all values in the container are true.