29 #include "WItemSelection.h"
30 #include "WItemSelector.h"
32 #include "exceptions/WNameNotUnique.h"
33 #include "exceptions/WOutOfBounds.h"
51 for(
size_t i = 0; i < r->get().
size(); ++i )
70 if( r->get().size() >= 1 )
82 if( r->get().size() >= 1 )
84 l.push_back( r->get().size() - 1 );
94 if( r->get().size() <= item )
96 throw WOutOfBounds( std::string(
"The specified item does not exist." ) );
Class for keeping a single named item in a WItemSelection.
virtual WItemSelector getSelectorLast()
Creates an default selection (last item selected).
virtual WItemSelector getSelectorNone()
Creates an default selection (no items selected).
virtual WItemSelector getSelectorFirst()
Creates an default selection (first item selected).
friend class WItemSelector
for proper locking and unlocking
void addItem(std::string name, std::string description="", const char **icon=NULL)
Convenience method to add a new item.
virtual WItemSelector getSelector(size_t item)
Creates an default selection (a specified items selected).
WItemSelection()
Default constructor.
virtual ~WItemSelection()
Destructor.
virtual WItemSelector getSelectorAll()
Creates an default selection (all items selected).
This class represents a subset of a WItemSelection.
std::vector< size_t > IndexList
The type used for storing index lists.
Indicates invalid element access of a container.
std::shared_ptr< WSharedObjectTicketRead< T > > ReadTicket
Type for read tickets.
ReadTicket getReadTicket() const
Returns a ticket to get read access to the contained data.
This class provides a common interface for thread-safe access to sequence containers (list,...
size_t size() const
The size of the container.
void push_back(const typename S::value_type &x)
Adds a new element at the end of the container.