Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_ValidatorMaps.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
11
12namespace Teuchos{
13
14
16{
17 validatorMap.insert(toInsert);
18}
19
20
22{
23 return validatorMap.find(id);
24}
25
26
28{
29 return validatorMap.begin();
30}
31
32
34{
35 return validatorMap.end();
36}
37
38
41
43{
44 const_iterator result = validatorMap.find(toInsert);
45 if(result == validatorMap.end()){
46 validatorMap.insert(ValidatorIDPair(toInsert, counter));
47 ++counter;
48 }
49}
50
51
53 const RCP<const ParameterEntryValidator> validator) const
54{
55 return validatorMap.find(validator);
56}
57
58
60{
61 return validatorMap.begin();
62}
63
64
66{
67 return validatorMap.end();
68}
69
70
71} // namespace Teuchos
const_iterator end() const
Returns a const_reference to the end of the map.
const_iterator begin() const
Returns a const_reference to the beginning of the map.
ValidatorMap::const_iterator const_iterator
std::pair< ParameterEntryValidator::ValidatorID, RCP< ParameterEntryValidator > > IDValidatorPair
const_iterator find(int id) const
Retrieves and iterator to a validator and id based on the id given.
void insert(IDValidatorPair toInsert)
inserts an IDValidatorPair into the map.
Smart reference counting pointer class for automatic garbage collection.
std::pair< RCP< const ParameterEntryValidator >, int > ValidatorIDPair
const_iterator end() const
Returns a const_reference to the end of the map.
void insert(RCP< const ParameterEntryValidator > toInsert)
inserts an IDValidatorPair into the map.
ValidatorMap::const_iterator const_iterator
const_iterator find(const RCP< const ParameterEntryValidator > validator) const
Returns an iterator to the validator and id specified by the validator.
const_iterator begin() const
Returns a const_reference to the beginning of the map.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...