Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_ValidatorFactory.cpp
1// @HEADER
2// *****************************************************************************
3// Teuchos: Common Tools Package
4//
5// Copyright 2004 NTESS and the Teuchos contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#include "Teuchos_ValidatorFactory.hpp"
11
12
13namespace Teuchos {
14
15
16RCP<ParameterEntryValidator>
18{
19 switch (valiType){
20 case Int:
22 case Short:
24 case Double:
26 case Float:
28 case IntArray:
30 case ShortArray:
32 case DoubleArray:
34 case FloatArray:
36 case FileName:
37 return rcp(new FileNameValidator());
38 case FileNameArray:
40 // 2010/07/30: Don't put a default clause in that does this! This will hide defects!
41 }
42 // Default return!
44 return toReturn;
45
46}
47
48
52
53
57
58
62
63
67
68
72
73
77
78
82
83
87
88
92
93
97
98
99} // namespace Teuchos
Convience class for FileNameValidators that are to be applied to arrays.
Smart reference counting pointer class for automatic garbage collection.
static RCP< ArrayNumberValidator< short > > getArrayShortValidator()
Creates and returns an Array Number Validator of type short.
static RCP< ArrayNumberValidator< float > > getArrayFloatValidator()
Creates and returns an Array Number Validator of type float.
static RCP< ArrayNumberValidator< double > > getArrayDoubleValidator()
Creates and returns an Array Number Validator of type double.
static RCP< FileNameValidator > getFileNameValidator()
Creates and returns FileNameValidator.
static RCP< EnhancedNumberValidator< double > > getDoubleValidator()
Creates and returns a Enhanced Number Validator of type double.
static RCP< ParameterEntryValidator > createValidator(ValidatorType valiType)
Creates a validator of the given type.
static RCP< EnhancedNumberValidator< float > > getFloatValidator()
Creates and returns a Enhanced Number Validator of type float.
static RCP< EnhancedNumberValidator< int > > getIntValidator()
Creates and returns a Enhanced Number Validator of type int.
static RCP< ArrayFileNameValidator > getArrayFileNameValidator()
Creates and returns an Array File Name Validator.
static RCP< EnhancedNumberValidator< short > > getShortValidator()
Creates and returns a Enhanced Number Validator of type short.
static RCP< ArrayNumberValidator< int > > getArrayIntValidator()
Creates and returns an Array Number Validator of type int.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.