stable
v1.7.0
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * ShapeTypeValidator.hpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Sep 6, 2012
|
|---|
| 5 | * Author: ankele
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef SHAPETYPEVALIDATOR_HPP_
|
|---|
| 9 | #define SHAPETYPEVALIDATOR_HPP_
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | // include config.h
|
|---|
| 14 | #ifdef HAVE_CONFIG_H
|
|---|
| 15 | #include <config.h>
|
|---|
| 16 | #endif
|
|---|
| 17 |
|
|---|
| 18 | #include <string>
|
|---|
| 19 |
|
|---|
| 20 | #include "Parameters/Validators/DiscreteValidator.hpp"
|
|---|
| 21 |
|
|---|
| 22 | /** This validator checks whether the given string is a shape type
|
|---|
| 23 | * (i.e. "sphere" etc).
|
|---|
| 24 | */
|
|---|
| 25 | class ShapeTypeValidator : public DiscreteValidator<std::string>
|
|---|
| 26 | {
|
|---|
| 27 | public:
|
|---|
| 28 | ShapeTypeValidator();
|
|---|
| 29 | bool isValid(const std::string & _value) const;
|
|---|
| 30 | virtual const std::vector<std::string> &getValidValues() const;
|
|---|
| 31 | bool operator==(const Validator<std::string> &_instance) const;
|
|---|
| 32 | Validator< std::string >* clone() const;
|
|---|
| 33 | };
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 | #endif /* SHAPETYPEVALIDATOR_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.