PageRenderTime 18ms CodeModel.GetById 9ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/lib-src/xylon/model/instructions/Error.h

https://bitbucket.org/spamdaemon/xylon
C++ Header | 62 lines | 29 code | 11 blank | 22 comment | 0 complexity | 57db33027f3e883f46fb56372d3e3a41 MD5 | raw file
 1#ifndef _XYLON_MODEL_INSTRUCTIONS_ERROR_H
 2#define _XYLON_MODEL_INSTRUCTIONS_ERROR_H
 3
 4#ifndef _XYLON_MODEL_INSTRUCTION_H
 5#include <xylon/model/Instruction.h>
 6#endif
 7
 8namespace xylon {
 9   namespace model {
10      namespace instructions {
11
12         /**
13          * The Error instruction terminates processing.
14          */
15         class Error : public Instruction
16         {
17               Error(const Error&);
18               Error&operator=(const Error&);
19
20               /** Default constructor */
21            protected:
22               Error() throws();
23
24               /** Destructor */
25            public:
26               ~Error() throws();
27
28               /**
29                * Create an error instruction
30                * @return an error instruction
31                */
32            public:
33               static ::timber::Reference< Instruction> create() throws();
34
35               /**
36                * Create an error instruction
37                * @param errMsg an error message
38                * @return an error instruction
39                */
40            public:
41               static ::timber::Reference< Instruction> create(const ::std::string& errMsg) throws();
42
43               /**
44                * Accept the specified visitor.
45                * @param v a visitor
46                */
47            public:
48               void accept(InstructionVisitor& v);
49
50               /**
51                * Get  the error message.
52                * @return an error message
53                */
54            public:
55               virtual const ::std::string& message() const throws() = 0;
56
57         };
58
59      }
60   }
61}
62#endif