Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
berryCallHistory.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 
18 #ifndef BERRYCALLHISTORY_H_
19 #define BERRYCALLHISTORY_H_
20 
21 #include <org_blueberry_test_Export.h>
22 
23 #include <berryObject.h>
24 #include <berryMacros.h>
25 
26 #include <Poco/Exception.h>
27 
28 #include <vector>
29 #include <ostream>
30 
31 namespace berry {
32 
54 class BERRY_TEST_EXPORT CallHistory : public Object {
55 
56 private:
57 
58  std::vector<std::string> methodList;
59 
60  // Class classType;
61 
62 public:
63 
65 
71  CallHistory(/*Object target*/);
72 
78  void Add(const std::string& methodName);
79 
83  void Clear();
84 
92  bool VerifyOrder(const std::vector<std::string>& testNames) const
93  throw(Poco::InvalidArgumentException);
94 
101  bool Contains(const std::string& methodName) const ;
102 
109  bool Contains(const std::vector<std::string>& methodNames) const;
110 
116  bool IsEmpty() const;
117 
121  void PrintTo(std::ostream& out) const;
122 
123 private:
124 
129  void TestMethodName(const std::string&) const throw(Poco::InvalidArgumentException);
130 
131 };
132 
133 }
134 
135 #endif /* BERRYCALLHISTORY_H_ */
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:78
#define berryObjectMacro(...)
Definition: berryMacros.h:37