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