ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
InjectorAddress.h
Go to the documentation of this file.
1 
53 #ifndef ETISS_FAULT_INJECTORADDRESS_H_
54 #define ETISS_FAULT_INJECTORADDRESS_H_
55 
56 #include <iostream>
57 #include <stdint.h>
58 #include <string>
59 
60 #ifndef NO_ETISS
61 #include "etiss/Misc.h"
62 #include "etiss/fault/Defs.h"
63 #include "etiss/fault/XML.h"
64 #else
65 #include "fault/Defs.h"
66 #include "fault/XML.h"
67 #endif
68 
69 namespace etiss
70 {
71 namespace fault
72 {
74 {
75  private:
76  std::string path_;
77  mutable Injector_ptr iptr_;
78  public: // ctors
80  InjectorAddress(const std::string &address);
83 #if CXX0X_UP_SUPPORTED
86 #endif
87 
88  public:
89  const std::string &getInjectorPath() const;
90  const Injector_ptr &getInjector() const;
92 
93  bool isResolved() const;
94 
95  inline std::string toString() const { return getInjectorPath(); }
96 };
97 
98 #if ETISS_FAULT_XML
99 
100 namespace xml
101 {
102 
103 template <>
104 bool parse<etiss::fault::InjectorAddress>(pugi::xml_node node, etiss::fault::InjectorAddress &dst, Diagnostics &diag);
105 template <>
106 bool write<etiss::fault::InjectorAddress>(pugi::xml_node node, const etiss::fault::InjectorAddress &src,
107  Diagnostics &diag);
108 
109 template <>
110 bool parse<etiss::fault::InjectorAddress *>(pugi::xml_node node, etiss::fault::InjectorAddress *&dst,
111  Diagnostics &diag);
112 template <>
113 bool write<const etiss::fault::InjectorAddress *>(pugi::xml_node node, const etiss::fault::InjectorAddress *const &src,
114  Diagnostics &diag);
115 
116 } // namespace xml
117 
118 #endif
119 
120 } // namespace fault
121 
122 } // namespace etiss
123 
124 #endif
contains general definitions used by other fault library code
general configuration and logging
contains XML related functions.
Marker interface for toString() support.
Definition: Misc.h:137
InjectorAddress & operator=(const InjectorAddress &)
const std::string & getInjectorPath() const
std::string toString() const
bool isResolved() const
> Calls Injector::get (implemented in VirtualStruct) to resolve path_ and get iptr_
const Injector_ptr & getInjector() const
Injector_ptr iptr_
Contains the pointer to the Injector.
std::string path_
Contains the VirtualStruct as string where the Injector refers to.
std::shared_ptr< Injector > Injector_ptr
Definition: Defs.h:83
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
Definition: Benchmark.h:53