OpendTect  6.6
interpretexpr.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Jaap Glas
8  Date: March 2011
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uicmddrivermod.h"
15 #include "bufstring.h"
16 
17 
18 namespace CmdDrive
19 {
20 
21 class CmdDriver;
22 
24 {
25 public:
27 
28  const char* process(const char* exprstr,BufferString& val,
29  bool isargument=false);
30 
31  bool isResultTrivial() const { return trivialresult_; }
32  const char* parsedExpr() const { return parsedexpr_.buf(); }
33  const char* breakPrefix() const { return breakprefix_.buf(); }
34  bool isParseError() const;
35  const char* errMsg() const;
36 
37 protected:
38  const char* interpretSingleExpr(const char* parstr,
39  BufferString& val);
40  const char* interpretCompositeExpr(const char* parstr,
41  BufferString& val);
42  void setBreakPrefix(const char* endptr,
43  BufferString& breakprefix) const;
44 
45  const char* exprstr_;
49 
51  // Start with '~'-symbol to denote parsing error
52 
53  const CmdDriver& drv_;
54 };
55 
56 
57 }; // namespace CmdDrive
58 
59 
CmdDrive::ExprInterpreter::parsedExpr
const char * parsedExpr() const
Definition: interpretexpr.h:32
CmdDrive::ExprInterpreter::isParseError
bool isParseError() const
CmdDrive::CmdDriver
Definition: cmddriver.h:103
CmdDrive::ExprInterpreter
Definition: interpretexpr.h:24
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
CmdDrive::ExprInterpreter::drv_
const CmdDriver & drv_
Definition: interpretexpr.h:53
CmdDrive::ExprInterpreter::exprstr_
const char * exprstr_
Definition: interpretexpr.h:45
bufstring.h
CmdDrive::ExprInterpreter::breakPrefix
const char * breakPrefix() const
Definition: interpretexpr.h:33
CmdDrive::ExprInterpreter::trivialresult_
bool trivialresult_
Definition: interpretexpr.h:46
CmdDrive::ExprInterpreter::errMsg
const char * errMsg() const
CmdDrive::ExprInterpreter::ExprInterpreter
ExprInterpreter(const CmdDriver &)
CmdDrive::ExprInterpreter::errmsg_
BufferString errmsg_
Definition: interpretexpr.h:50
CmdDrive::ExprInterpreter::breakprefix_
BufferString breakprefix_
Definition: interpretexpr.h:48
CmdDrive::ExprInterpreter::process
const char * process(const char *exprstr, BufferString &val, bool isargument=false)
CmdDrive::ExprInterpreter::interpretCompositeExpr
const char * interpretCompositeExpr(const char *parstr, BufferString &val)
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
CmdDrive::ExprInterpreter::interpretSingleExpr
const char * interpretSingleExpr(const char *parstr, BufferString &val)
CmdDrive::ExprInterpreter::parsedexpr_
BufferString parsedexpr_
Definition: interpretexpr.h:47
CmdDrive
Command Drive
Definition: canvascommands.h:22
CmdDrive::ExprInterpreter::isResultTrivial
bool isResultTrivial() const
Definition: interpretexpr.h:31
CmdDrive::ExprInterpreter::setBreakPrefix
void setBreakPrefix(const char *endptr, BufferString &breakprefix) const

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021