bes  Updated for version 3.20.6
DebugFunctions.h
1 // DebugFunctions.h
2 
3 // This file is part of bes, A C++ back-end server implementation framework
4 // for the OPeNDAP Data Access Protocol.
5 
6 // Copyright (c) 2013 OPeNDAP, Inc.
7 // Author: Nathan Potter <ndp@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 #ifndef DEBUGFUNCTIONS_H_
26 #define DEBUGFUNCTIONS_H_
27 
28 #include <stdlib.h>
29 
30 #include <BaseType.h>
31 #include <DDS.h>
32 #include <ServerFunction.h>
33 #include "BESAbstractModule.h"
34 
35 namespace debug_function {
36 
37 
39 public:
41  {
42  }
43  virtual ~DebugFunctions()
44  {
45  }
46  virtual void initialize(const string &modname);
47  virtual void terminate(const string &modname);
48 
49  virtual void dump(ostream &strm) const;
50 };
51 
52 
53 
54 
55 
56 /*****************************************************************************************
57  *
58  * Abort Function (Debug Functions)
59  *
60  * This server side function calls abort(). (boom)
61  *
62  */
63 void abort_ssf(int argc, libdap::BaseType * argv[], libdap::DDS &dds, libdap::BaseType **btpp);
64 class AbortFunc: public libdap::ServerFunction {
65 public:
66  AbortFunc();
67  virtual ~AbortFunc(){}
68 };
69 
70 /*****************************************************************************************
71  *
72  * Sleep Function (Debug Functions)
73  *
74  * This server side function calls sleep() for the number
75  * of millisecs passed in at argv[0]. (Zzzzzzzzzzzzzzz)
76  *
77  */
78 void sleep_ssf(int argc, libdap::BaseType * argv[], libdap::DDS &dds, libdap::BaseType **btpp);
79 class SleepFunc: public libdap::ServerFunction {
80 public:
81  SleepFunc();
82  virtual ~SleepFunc(){}
83 };
84 
85 
86 /*****************************************************************************************
87  *
88  * SumUntil Function (Debug Functions)
89  *
90  * This server side function computes a sum until a the amount of
91  * of millisecs passed in at argv[0] has transpired. (++++++)
92  *
93  */
94 void sum_until_ssf(int argc, libdap::BaseType * argv[], libdap::DDS &dds, libdap::BaseType **btpp);
95 class SumUntilFunc: public libdap::ServerFunction {
96 public:
97  SumUntilFunc();
98  virtual ~SumUntilFunc(){}
99 
100 };
101 
102 
103 /*****************************************************************************************
104  *
105  * Error Function (Debug Functions)
106  *
107  * This server side function calls calls sleep() for the number
108  * of ms passed in at argv[0]. (Zzzzzzzzzzzzzzz)
109  *
110  */
111 void error_ssf(int argc, libdap::BaseType * argv[], libdap::DDS &dds, libdap::BaseType **btpp);
112 class ErrorFunc: public libdap::ServerFunction {
113 public:
114  ErrorFunc();
115  virtual ~ErrorFunc(){}
116 };
117 
118 } // namespace debug
119 #endif /* DEBUGFUNCTIONS_H_ */
debug_function::ErrorFunc
Definition: DebugFunctions.h:112
BESAbstractModule
Definition: BESAbstractModule.h:40
debug_function::AbortFunc
Definition: DebugFunctions.h:64
debug_function::DebugFunctions::dump
virtual void dump(ostream &strm) const
dumps information about this object
Definition: DebugFunctions.cc:97
debug_function::SleepFunc
Definition: DebugFunctions.h:79
debug_function::DebugFunctions
Definition: DebugFunctions.h:38
debug_function::SumUntilFunc
Definition: DebugFunctions.h:95