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