libdap Updated for version 3.21.1
libdap4 is an implementation of OPeNDAP's DAP protocol.
ServerFunction.cc
Go to the documentation of this file.
1// -*- mode: c++; c-basic-offset:4 -*-
2
3// This file is part of libdap, A C++ implementation of the OPeNDAP Data
4// Access Protocol.
5
6// Copyright (c) 2013 OPeNDAP, Inc.
7// Author: Nathan Potter <npotter@opendap.org>
8//
9// This library is free software; you can redistribute it and/or
10// modify it under the terms of the GNU Lesser General Public
11// License as published by the Free Software Foundation; either
12// version 2.1 of the License, or (at your option) any later version.
13//
14// This library is distributed in the hope that it will be useful,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17// Lesser General Public License for more details.
18//
19// You should have received a copy of the GNU Lesser General Public
20// License along with this library; if not, write to the Free Software
21// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22//
23// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
24
25/*
26 * AbstractFunction.cc
27 *
28 * Created on: Feb 2, 2013
29 * Author: ndp
30 */
31
32#include "config.h"
33
34#include "ServerFunction.h"
35
36using namespace std;
37
38namespace libdap {
39
40ServerFunction::ServerFunction() : d_bool_func(0), d_btp_func(0), d_proj_func(0), d_d4_function(0) {
41 setName("abstract_function");
42 setDescriptionString("This function does nothing.");
43 setUsageString("You can't use this function");
44 setRole("http://services.opendap.org/dap4/server-side-function/null");
45 setDocUrl("http://docs.opendap.org/index.php/Server_Side_Processing_Functions");
46}
47
48ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url,
49 string role, bool_func f)
50 : d_bool_func(0), d_btp_func(0), d_proj_func(0), d_d4_function(0) {
51 setName(name);
52 setVersion(version);
53 setDescriptionString(description);
54 setUsageString(usage);
55 setRole(role);
56 setDocUrl(doc_url);
57 setFunction(f);
58}
59
60ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url,
61 string role, btp_func f)
62 : d_bool_func(0), d_btp_func(0), d_proj_func(0), d_d4_function(0) {
63 setName(name);
64 setVersion(version);
65 setDescriptionString(description);
66 setUsageString(usage);
67 setRole(role);
68 setDocUrl(doc_url);
69 setFunction(f);
70}
71
72ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url,
73 string role, proj_func f)
74 : d_bool_func(0), d_btp_func(0), d_proj_func(0), d_d4_function(0) {
75 setName(name);
76 setVersion(version);
77 setDescriptionString(description);
78 setUsageString(usage);
79 setRole(role);
80 setDocUrl(doc_url);
81 setFunction(f);
82}
83
84ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url,
85 string role, D4Function f)
86 : d_bool_func(0), d_btp_func(0), d_proj_func(0), d_d4_function(0) {
87 setName(name);
88 setVersion(version);
89 setDescriptionString(description);
90 setUsageString(usage);
91 setRole(role);
92 setDocUrl(doc_url);
93 setFunction(f);
94}
95
96} /* namespace libdap */
void setUsageString(const std::string &u)
void setRole(const std::string &r)
void setVersion(const std::string &ver)
void setFunction(bool_func bf)
void setName(const std::string &n)
void setDocUrl(const std::string &url)
void setDescriptionString(const std::string &desc)
top level DAP object to house generic methods
Definition AISConnect.cc:30
BaseType *(* D4Function)(D4RValueList *, DMR &)
Definition D4Function.h:41