Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_CommaSeparatedEntryValidator.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Panzer: A partial differential equation assembly
4// engine for strongly coupled complex multiphysics systems
5//
6// Copyright 2011 NTESS and the Panzer contributors.
7// SPDX-License-Identifier: BSD-3-Clause
8// *****************************************************************************
9// @HEADER
10
11#ifndef __Panzer_CommaSeparatedEntryValidator_hpp__
12#define __Panzer_CommaSeparatedEntryValidator_hpp__
13
14#include <map>
15#include <set>
16#include <vector>
17#include <string>
18#include <iostream>
19
20#include "Teuchos_ParameterList.hpp"
21#include "Teuchos_ParameterEntry.hpp"
22#include "Teuchos_ParameterEntryValidator.hpp"
23#include "Teuchos_RCP.hpp"
24
25namespace panzer {
26
31class CommaSeparatedEntryValidator : public Teuchos::ParameterEntryValidator {
32public:
36 CommaSeparatedEntryValidator(bool allowEmpty=false) : allowEmpty_(allowEmpty) {}
37
38 ValidStringsList validStringValues() const
39 { return Teuchos::null; }
40
41 void validate(const Teuchos::ParameterEntry & entry,
42 const std::string & paramName,
43 const std::string & sublistName) const;
44
45 const std::string getXMLTypeName() const
46 { return "string-list"; }
47
48 void printDoc(const std::string & docString, std::ostream &out) const;
49
51 static void split(const std::string & str,
52 const std::string & delim,
53 std::vector<std::string> & tokens);
54private:
55
57};
58
59}
60
61#endif
static void split(const std::string &str, const std::string &delim, std::vector< std::string > &tokens)
Utility function for tokenizing.
void validate(const Teuchos::ParameterEntry &entry, const std::string &paramName, const std::string &sublistName) const
void printDoc(const std::string &docString, std::ostream &out) const