libdap  Updated for version 3.20.6
libdap4 is an implementation of OPeNDAP's DAP protocol.
ServerFunction.cc
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 
36 using namespace std;
37 
38 namespace libdap {
39 
40 ServerFunction::ServerFunction() : d_bool_func(0), d_btp_func(0), d_proj_func(0), d_d4_function(0)
41 {
42  setName("abstract_function");
43  setDescriptionString("This function does nothing.");
44  setUsageString("You can't use this function");
45  setRole("http://services.opendap.org/dap4/server-side-function/null");
46  setDocUrl("http://docs.opendap.org/index.php/Server_Side_Processing_Functions");
47 }
48 
49 ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url,
50  string role, bool_func f) : d_bool_func(0), d_btp_func(0), d_proj_func(0), d_d4_function(0)
51 {
52  setName(name);
53  setVersion(version);
54  setDescriptionString(description);
55  setUsageString(usage);
56  setRole(role);
57  setDocUrl(doc_url);
58  setFunction(f);
59 }
60 
61 ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url,
62  string role, btp_func f) : d_bool_func(0), d_btp_func(0), d_proj_func(0), d_d4_function(0)
63 {
64  setName(name);
65  setVersion(version);
66  setDescriptionString(description);
67  setUsageString(usage);
68  setRole(role);
69  setDocUrl(doc_url);
70  setFunction(f);
71 
72 }
73 
74 ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url,
75  string role, proj_func f) : d_bool_func(0), d_btp_func(0), d_proj_func(0), d_d4_function(0)
76 {
77  setName(name);
78  setVersion(version);
79  setDescriptionString(description);
80  setUsageString(usage);
81  setRole(role);
82  setDocUrl(doc_url);
83  setFunction(f);
84 }
85 
86 ServerFunction::ServerFunction(string name, string version, string description, string usage, string doc_url,
87  string role, D4Function f) : d_bool_func(0), d_btp_func(0), d_proj_func(0), d_d4_function(0)
88 {
89  setName(name);
90  setVersion(version);
91  setDescriptionString(description);
92  setUsageString(usage);
93  setRole(role);
94  setDocUrl(doc_url);
95  setFunction(f);
96 }
97 
98 } /* namespace libdap */
virtual string name() const
Returns the name of the class instance.
Definition: BaseType.cc:320
STL namespace.
top level DAP object to house generic methods
Definition: AISConnect.cc:30