Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
22 #include "Teuchos_ParameterEntryValidator.hpp"
23 #include "Teuchos_RCP.hpp"
24 
25 namespace panzer {
26 
32 public:
36  CommaSeparatedEntryValidator(bool allowEmpty=false) : allowEmpty_(allowEmpty) {}
37 
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);
54 private:
55 
56  bool allowEmpty_;
57 };
58 
59 }
60 
61 #endif
void printDoc(const std::string &docString, std::ostream &out) const
void validate(const Teuchos::ParameterEntry &entry, const std::string &paramName, const std::string &sublistName) const
static void split(const std::string &str, const std::string &delim, std::vector< std::string > &tokens)
Utility function for tokenizing.