Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
otherlibs
tclap
Constraint.h
Go to the documentation of this file.
1
2
/******************************************************************************
3
*
4
* file: Constraint.h
5
*
6
* Copyright (c) 2005, Michael E. Smoot
7
* All rights reverved.
8
*
9
* See the file COPYING in the top directory of this distribution for
10
* more information.
11
*
12
* THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
13
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18
* DEALINGS IN THE SOFTWARE.
19
*
20
*****************************************************************************/
21
22
#ifndef TCLAP_CONSTRAINT_H
23
#define TCLAP_CONSTRAINT_H
24
25
#include <string>
26
#include <vector>
27
#include <list>
28
#include <iostream>
29
#include <iomanip>
30
#include <algorithm>
31
32
namespace
TCLAP {
33
34
/**
35
* The interface that defines the interaction between the Arg and Constraint.
36
*/
37
template
<
class
T>
38
class
Constraint
39
{
40
41
public
:
42
/**
43
* Returns a description of the Constraint.
44
*/
45
virtual
std::string
description
()
const
=0;
46
47
/**
48
* Returns the short ID for the Constraint.
49
*/
50
virtual
std::string
shortID
()
const
=0;
51
52
/**
53
* The method used to verify that the value parsed from the command
54
* line meets the constraint.
55
* \param value - The value that will be checked.
56
*/
57
virtual
bool
check
(
const
T& value)
const
=0;
58
59
/**
60
* Destructor.
61
* Silences warnings about Constraint being a base class with virtual
62
* functions but without a virtual destructor.
63
*/
64
virtual
~Constraint
() { ; }
65
};
66
67
}
//namespace TCLAP
68
#endif
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013