Support Software for Vector Reduction/Transformation Operators  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RTOpPack_RTOpServerDecl.hpp
1 // @HEADER
2 // *****************************************************************************
3 // RTOp: Interfaces and Support Software for Vector Reduction Transformation
4 // Operations
5 //
6 // Copyright 2006 NTESS and the RTOp contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #ifndef RTOP_SERVER_DECL_HPP
12 #define RTOP_SERVER_DECL_HPP
13 
14 #include "RTOpPack_RTOpT.hpp"
15 #include "Teuchos_AbstractFactory.hpp"
16 
17 namespace RTOpPack {
18 
24 template<class Scalar>
25 class RTOpServer {
26 public:
27 
44 
55 
58  void print_op_factories(std::ostream& o) const;
59 
60 private:
61  typedef std::map< std::string, Teuchos::RCP<Teuchos::AbstractFactory<RTOpT<Scalar> > > > op_factories_t;
62  op_factories_t op_factories_;
63 
64 }; // class RTOpServer
65 
66 } // namespace RTOpPack
67 
68 #endif // RTOP_SERVER_DECL_HPP
Teuchos::RCP< Teuchos::AbstractFactory< RTOpPack::RTOpT< Scalar > > > get_op_factory(const char op_name[]) const
Get an operator factory given the name of the operator.
void add_op_factory(const Teuchos::RCP< Teuchos::AbstractFactory< RTOpPack::RTOpT< Scalar > > > &op_factory)
Add a new abstract factory for an RTOpT operator.
void print_op_factories(std::ostream &o) const
Print out all of the operator factories that have been added.
Server for creating RTOpT objects given just the operators name.