source: src/Parameters/Validators/Specific/ShapeTypeValidator.hpp

stable v1.7.0
Last change on this file was dc438c, checked in by Frederik Heber <heber@…>, 13 years ago

Refactoring: ShapeTypeValidator as DiscreteValidator.

  • Property mode set to 100644
File size: 761 bytes
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 */
25class ShapeTypeValidator : public DiscreteValidator<std::string>
26{
27public:
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.