Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AEvil_def.hpp
Go to the documentation of this file.
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 #ifndef A_EVIL_DEF_HPP
11 #define A_EVIL_DEF_HPP
12 
13 
14 #include "AEvil_decl.hpp"
15 // We have to include this file to be 100% safe since we included
16 // EvilBaseDecl.hpp in AEvilDecl.hpp
17 #include "EvilBase.hpp"
18 // We need to have BEvil's implementation to call it!
19 #include "BEvil.hpp"
20 
21 
22 namespace EvilPack {
23 
24 
25 template<class T>
26 void AEvil<T>::callBEvil(const BEvil<T> &bEvil, const T& obj) const
27 {
28  using Teuchos::typeName;
29  std::cout << typeName(*this) << " call BEvil: ";
30  bEvil.soundOff(obj);
31 }
32 
33 
34 template<class T>
35 void AEvil<T>::soundOff(const T& obj) const
36 {
37  using Teuchos::typeName;
38  std::cout << typeName(*this) << " obj = " << obj << "\n";
39 }
40 
41 
42 } // namespace EvilPack
43 
44 
45 #endif // A_EVIL_DEF_HPP
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.
void soundOff(const T &obj) const
Definition: BEvil_def.hpp:35
void callBEvil(const BEvil< T > &bEvil, const T &obj) const
Definition: AEvil_def.hpp:26
void soundOff(const T &obj) const
Definition: AEvil_def.hpp:35
A subclass of EvilBase that calls AEvil.
Definition: AEvil_decl.hpp:22