Clause.h
// -*- mode: c++; c-basic-offset:4 -*-
// This file is part of libdap, A C++ implementation of the OPeNDAP Data
// Access Protocol.
// Copyright (c) 2002,2003 OPeNDAP, Inc.
// Author: James Gallagher <jgallagher@opendap.org>
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
// (c) COPYRIGHT URI/MIT 1995-1999
// Please first read the full copyright statement in the file COPYRIGHT_URI.
//
// Authors:
// jhrg,jimg James Gallagher <jgallagher@gso.uri.edu>
// Interface for the CE Clause class.
#ifndef _clause_h
#define _clause_h
#ifndef _expr_h
#include "expr.h"
#endif
#ifndef _rvalue_h
#include "RValue.h"
#endif
namespace libdap {
struct Clause {
private:
int _op;
bool_func _b_func;
btp_func _bt_func;
int _argc; // arg count
rvalue *_arg1; // only for operator
rvalue_list *_args; // vector arg
Clause(const Clause &);
Clause &operator=(const Clause &);
public:
Clause(const int oper, rvalue *a1, rvalue_list *rv);
Clause(bool_func func, rvalue_list *rv);
Clause(btp_func func, rvalue_list *rv);
Clause();
virtual ~Clause();
bool OK();
bool boolean_clause();
bool value_clause();
bool value(DDS &dds);
bool value(DDS &dds, BaseType **value);
};
} // namespace libdap
#endif // _clause_h
libdap::BaseType
The basic data type for the DODS DAP types.
Definition BaseType.h:118
libdap::DDS
Definition DDS.h:176
libdap::rvalue
Definition RValue.h:47
libdap
top level DAP object to house generic methods
Definition AlarmHandler.h:35
libdap::Clause
Holds a fragment of a constraint expression.
Definition Clause.h:88
libdap::Clause::value_clause
bool value_clause()
Return true if the clause returns a value in a BaseType pointer.
Definition Clause.cc:127
libdap::Clause::boolean_clause
bool boolean_clause()
Return true if the clause returns a boolean value.
Definition Clause.cc:120
libdap::Clause::value
bool value(DDS &dds)
Evaluate a clause which returns a boolean value This method must only be evaluated for clauses with r...
Definition Clause.cc:143
libdap::Clause::OK
bool OK()
Checks the "representation invariant" of a clause.
Definition Clause.cc:99