#include <searchissue.h>
Public Member Functions | |
| SearchIssue (bool found) | |
| Constructor. | |
| SearchIssue (bool found, Element &element) | |
| Constructor. | |
| ~SearchIssue () | |
| Destructor. | |
| bool | found () const |
| Returns true if the search succeeded, false otherwise. | |
| Element & | get () |
| Returns the element was taken if the search succeded. | |
Static Public Attributes | |
| static Element | _empty_element = Element( ) |
Private Attributes | |
| bool | _found |
| Element & | _element |
The result for a search can be described by two states: the search succeded or fails; if it succeeded the element that was found could be taken. This class summarizes this concept.
| nmn::SearchIssue< Element >::SearchIssue | ( | bool | found | ) |
Constructor.
| found | true if the search succeeded, false otherwise. |
| nmn::SearchIssue< Element >::SearchIssue | ( | bool | found, | |
| Element & | element | |||
| ) |
Constructor.
| found | true if the search succeeded, false otherwise. | |
| element | the elemet took if the search succeeded. |
| nmn::SearchIssue< Element >::~SearchIssue | ( | ) |
Destructor.
| bool nmn::SearchIssue< Element >::found | ( | ) | const |
Returns true if the search succeeded, false otherwise.
When the SearchIssue object was created, the constructor always accept a boolean parameter that values true if the search succeeded, false otherwise. This method return that value.
| Element & nmn::SearchIssue< Element >::get | ( | ) |
Returns the element was taken if the search succeded.
If the search succeeded the element was found is returned, otherwise a default static empty element is returned.
Element& nmn::SearchIssue< Element >::_element [private] |
Element nmn::SearchIssue< Element >::_empty_element = Element( ) [static] |
bool nmn::SearchIssue< Element >::_found [private] |
1.4.7