5 #ifndef CNOID_UTIL_SELECTION_H 6 #define CNOID_UTIL_SELECTION_H 17 explicit Selection(
const char* domainname = 0);
19 explicit Selection(
size_t size,
const char* domainname = 0);
22 return symbols_.size();
25 operator bool()
const {
26 return selectedIndex_ >= 0;
33 void setSymbol(
int index,
const std::string& symbol);
38 return symbols_[index];
41 const std::string&
symbol(
int index)
const {
42 return symbols_[index];
45 int index(
const std::string& symbol)
const;
47 const char* label(
int index)
const;
49 bool select(
int index);
50 bool selectIndex(
int index);
51 bool select(
const std::string& symbol);
54 return selectedIndex_;
58 return selectedIndex_;
61 bool is(
int index)
const {
62 return (index == selectedIndex_);
65 const char* selectedSymbol()
const;
66 const char* selectedLabel()
const;
69 std::vector<std::string> symbols_;
71 const char* domainname_;
CNOID_EXPORT std::ostream & operator<<(std::ostream &os, const BoundingBox &bb)
Definition: BoundingBox.cpp:153
int selectedIndex() const
Definition: Selection.h:53
bool is(int index) const
Definition: Selection.h:61
Definition: Selection.h:14
std::string & symbol(int index)
Definition: Selection.h:37
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
int size() const
Definition: Selection.h:21
const std::string & symbol(int index) const
Definition: Selection.h:41
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
int which() const
Definition: Selection.h:57