Calculator
Extensible stack-based calculator primarily in library form
Error.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2013, Komodo Does Inc
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6 
7 - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9 - Neither the name of the Komodo Does Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10 
11 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 */
13 
14 #ifndef ERROR_H
15 #define ERROR_H
16 
17 #include <string>
18 
19 namespace Calculator {
20 
21  namespace Error {
22  /** Operation was successful */
23  const std::string Ok = "Ok";
24 
25  /** Operation required more items than the Stack had available */
26  const std::string StackUnderflow = "Insufficient Stack Arguments";
27 
28  /** Operation required a variable. Variable has not been set. */
29  const std::string VariableNotSet = "Variable is not set";
30 
31  /** Variable dereferences to itself directly or indirectly and cannot be read */
32  const std::string VariableReferencesSelf = "Variable references itself and has no value";
33  };
34 
35 } // namespace Calculator
36 
37 #endif // ERROR_H
38 
const std::string VariableReferencesSelf
Variable dereferences to itself directly or indirectly and cannot be read.
Definition: Error.h:32
const std::string StackUnderflow
Operation required more items than the Stack had available.
Definition: Error.h:26
const std::string Ok
Operation was successful.
Definition: Error.h:23
const std::string VariableNotSet
Operation required a variable.
Definition: Error.h:29
Container of Calculator resources.