00001 00002 /* 00003 | Author: Michael Schmidt; 00004 | Gunnar Jehl 00005 | 00006 | ************************* SOFTWARE LICENSE AGREEMENT *********************** 00007 | This source code is published under the BSD License. 00008 | 00009 | See file 'LICENSE.txt' that comes with this distribution or 00010 | http://dbis.informatik.uni-freiburg.de/index.php?project=GCX/license.php 00011 | for the full license agreement. 00012 | 00013 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00014 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00015 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00016 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00017 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00018 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00019 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00020 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00021 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00022 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00023 | POSSIBILITY OF SUCH DAMAGE. 00024 | **************************************************************************** 00025 */ 00026 00035 #ifndef OPERANDEXPRESSION_H 00036 #define OPERANDEXPRESSION_H 00037 00038 #include "expression.h" 00039 #include "value.h" 00040 00054 class OperandExpression:public Expression { 00055 00056 public: 00062 OperandExpression(EXP_TYPE _type, EXP_TYPE _op_type); 00063 00067 virtual ~ OperandExpression(); 00068 00076 virtual bool isSingleValued() = 0; 00077 00086 virtual void prepareOperand(OutputStream & eos, Environment * env, 00087 unsigned modus) = 0; 00088 00094 virtual void unprepareOperand() = 0; 00095 00101 virtual Value *getNextValue() = 0; 00102 00108 inline const EXP_TYPE getOperandType() { 00109 return op_type; 00110 } protected: 00115 EXP_TYPE op_type; 00116 00121 bool initial; 00122 00127 Value cur_val; 00128 }; 00129 00130 #endif // OPERANDEXPRESSION_H