Blame tests/D4TestFunction.h

Packit a4aae4
Packit a4aae4
// -*- mode: c++; c-basic-offset:4 -*-
Packit a4aae4
Packit a4aae4
// This file is part of libdap, A C++ implementation of the OPeNDAP Data
Packit a4aae4
// Access Protocol.
Packit a4aae4
Packit a4aae4
// Copyright (c) 2013 OPeNDAP, Inc.
Packit a4aae4
// Authors: Nathan Potter <npotter@opendap.org>
Packit a4aae4
//		James Gallagher <jgallagher@opendap.org>
Packit a4aae4
//
Packit a4aae4
// This library is free software; you can redistribute it and/or
Packit a4aae4
// modify it under the terms of the GNU Lesser General Public
Packit a4aae4
// License as published by the Free Software Foundation; either
Packit a4aae4
// version 2.1 of the License, or (at your option) any later version.
Packit a4aae4
//
Packit a4aae4
// This library is distributed in the hope that it will be useful,
Packit a4aae4
// but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit a4aae4
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit a4aae4
// Lesser General Public License for more details.
Packit a4aae4
//
Packit a4aae4
// You should have received a copy of the GNU Lesser General Public
Packit a4aae4
// License along with this library; if not, write to the Free Software
Packit a4aae4
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit a4aae4
//
Packit a4aae4
// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
Packit a4aae4
Packit a4aae4
#include <ServerFunction.h>
Packit a4aae4
Packit a4aae4
namespace libdap {
Packit a4aae4
Packit a4aae4
class BaseType;
Packit a4aae4
class DDS;
Packit a4aae4
class DMR;
Packit a4aae4
class D4RValueList;
Packit a4aae4
Packit a4aae4
/**
Packit a4aae4
 * The scale() function scales data.
Packit a4aae4
 */
Packit a4aae4
void function_scale_dap2(int argc, BaseType *argv[], DDS &dds, BaseType **btpp);
Packit a4aae4
BaseType *function_scale_dap4(D4RValueList *args, DMR &dmr);
Packit a4aae4
Packit a4aae4
/**
Packit a4aae4
 * The LinearScaleFunction class encapsulates the linear_scale function 'function_linear_scale'
Packit a4aae4
 * along with additional meta-data regarding its use and applicability.
Packit a4aae4
 */
Packit a4aae4
class D4TestFunction: public ServerFunction {
Packit a4aae4
public:
Packit a4aae4
	D4TestFunction()
Packit a4aae4
    {
Packit a4aae4
		setName("scale");
Packit a4aae4
		setDescriptionString("The scale() function is for testing.");
Packit a4aae4
		setUsageString("scale(var, num): scale var by num. var can be a scalar or an array");
Packit a4aae4
		setRole("http://services.opendap.org/dap4/server-side-function/scale");
Packit a4aae4
		setDocUrl("http://docs.opendap.org/index.php/Server_Side_Processing_Functions");
Packit a4aae4
		setFunction(function_scale_dap2);
Packit a4aae4
		setVersion("1.0");
Packit a4aae4
Packit a4aae4
		setFunction(function_scale_dap4);
Packit a4aae4
    }
Packit a4aae4
    virtual ~D4TestFunction()
Packit a4aae4
    {
Packit a4aae4
    }
Packit a4aae4
};
Packit a4aae4
Packit a4aae4
} // libdap namespace