72 : controller_(controller)
74 controller_.beginChange(group, details);
80 controller_.endChange();
107 template <
class Assignee,
class Value>
118 template <
class Changeable>
123 (changeable.*change)();
129 template <
class Change,
class Changeable,
class Arg>
134 (changeable.*change)(arg);
140 template <
class Change,
class Changeable,
class Arg1,
class Arg2>
147 (changeable.*change)(arg1, arg2);
168 return (&left == &right);
174 return (&left != &right);
180template <
class Type,
class Container = std::vector<Type> >
191 typedef typename Items::size_type
Size;
206 , items_(other.items_)
211 template <
class InputIterator>
214 , items_(first, last)
227 return items_.empty();
233 return items_.size();
239 return items_.begin();
251 return items_[index];
256 template <
class Initializer>
259 group_.controlChange(
"Initialize List", &ListSetting::initNoControl<Initializer>, *
this, initializer);
265 group_.controlChange(
266 "Append an Item",
static_cast<void (
Items::*)(
const Item&)
>(&Items::push_back), items_, item
276 group_.controlChange(
"Clear the List", &Items::clear, items_);
288 template <
class InputIterator>
291 group_.controlChange(
"Assign List", &Items::assign, items_, first, last);
304 items_ = other.items_;
314 template <
class Initializer>
315 void initNoControl(Initializer initializer)
336 if (++item == endOfList)
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_LTWT
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
#define ONIXS_CMEMDH_LTWT_EXPORTED
#define ONIXS_CMEMDH_NAMESPACE_END
Represents a setting which is a list of values.
Iterator begin() const
Returns iterator pointing to the beginning of the list.
ListSetting & assign(InputIterator first, InputIterator last)
Re-initialize the list as a copy of the given range.
const Item & operator[](Size index) const
Provides access to the items by its index.
ListSetting & operator=(const ListSetting &other)
Re-initialize the list as a copy of the other one.
void initialize(Initializer initializer)
ListSetting & assignNoControl(const ListSetting &other)
Iterator end() const
Returns iterator pointing to the item beyond the last one.
bool empty() const
Indicates whether the list is an empty one.
ListSetting(InputIterator first, InputIterator last)
Initializes as copy of the given range of items.
Items::const_iterator Iterator
ListSetting(const ListSetting &other)
Initializes as a copy the other instance.
void push_back(const Item &item)
Appends the given item to the tail of the list.
std::vector< std::string > Items
Size size() const
Returns number of items in the given list.
ListSetting(const SettingGroup *group=nullptr)
Scope guard to update setting in the safe way.
~SettingChangeGuard()
Accomplishes setting update.
SettingChangeGuard(SettingChangeController &controller, const SettingGroup &group, const Messaging::Char *details)
Initializes the guard for the given setting update.
Base services for settings grouped by a certain criteria.
SettingGroup(SettingChangeController *controller=nullptr)
void controlChange(const Messaging::Char *description, Change change, Changeable &changeable, const Arg1 &arg1, const Arg2 &arg2) const
void controlChange(const Messaging::Char *description, void(Changeable::*change)(), Changeable &changeable) const
void controlAssignment(const Messaging::Char *description, Assignee &assignee, Value value) const
void controlChange(const Messaging::Char *description, Change change, Changeable &changeable, const Arg &arg) const
static const SettingGroup & null()
~SettingGroup()
Does actually nothing.
char Char
Character type alias.
void toStr(std::string &, Int8)
Serializes given integer into a string.
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
bool operator==(const MemoryPoolAllocator< Object > &left, const MemoryPoolAllocator< OtherObject > &right)
bool operator!=(const MemoryPoolAllocator< Object > &left, const MemoryPoolAllocator< OtherObject > &right)
virtual void endChange()=0
virtual void beginChange(const SettingGroup &, const Messaging::Char *)=0
void endChange() override
Implements base class interface.
static SettingChangeController & self()
void beginChange(const SettingGroup &, const Messaging::Char *) override
Implements base class interface.