diff --git a/CEP/BB/BBSControl/include/BBSControl/FinalizeCommand.h b/CEP/BB/BBSControl/include/BBSControl/FinalizeCommand.h new file mode 100644 index 0000000000000000000000000000000000000000..cdd92fc80ad526c91ebeea0f49c35d4078fba11c --- /dev/null +++ b/CEP/BB/BBSControl/include/BBSControl/FinalizeCommand.h @@ -0,0 +1,43 @@ +//# FinalizeCommand.h: +//# +//# Copyright (C) 2007 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program 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 General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id$ + +#ifndef LOFAR_BBSCONTROL_FINALIZECOMMAND_H +#define LOFAR_BBSCONTROL_FINALIZECOMMAND_H + +#include <BBSControl/Command.h> + +namespace LOFAR +{ +namespace BBS +{ + +class FinalizeCommand +{ +public: + // Accept a CommandHandler that wants to process \c *this. + virtual void accept(CommandHandler &handler) const; +}; + +} //# namespace BBS +} //# namespace LOFAR + +#endif diff --git a/CEP/BB/BBSControl/include/BBSControl/InitializeCommand.h b/CEP/BB/BBSControl/include/BBSControl/InitializeCommand.h new file mode 100644 index 0000000000000000000000000000000000000000..4b61536a082fd7e66b92b789a835db5671c28b46 --- /dev/null +++ b/CEP/BB/BBSControl/include/BBSControl/InitializeCommand.h @@ -0,0 +1,56 @@ +//# InitializeCommand.h: +//# +//# Copyright (C) 2007 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program 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 General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id$ + +#ifndef LOFAR_BBSCONTROL_INITIALIZECOMMAND_H +#define LOFAR_BBSCONTROL_INITIALIZECOMMAND_H + +#include <BBSControl/Command.h> + +namespace LOFAR +{ +namespace BBS +{ + +class InitializeCommand: public Command +{ +public: + // Accept a CommandHandler that wants to process \c *this. + virtual void accept(CommandHandler &handler) const; + + // Return the class type of \c *this as a string. + const string &classType() const; + + // Write the contents of \c *this into the blob output stream \a bos. + virtual void write(BlobOStream &bos) const + { + } + + // Read the contents from the blob input stream \a bis into \c *this. + virtual void read(BlobIStream &bis) + { + } +}; + +} //# namespace BBS +} //# namespace LOFAR + +#endif diff --git a/CEP/BB/BBSControl/include/BBSControl/NextChunkCommand.h b/CEP/BB/BBSControl/include/BBSControl/NextChunkCommand.h new file mode 100644 index 0000000000000000000000000000000000000000..da9e0c29d18daf21bda39ce32c0615549d3914f3 --- /dev/null +++ b/CEP/BB/BBSControl/include/BBSControl/NextChunkCommand.h @@ -0,0 +1,43 @@ +//# NextChunkCommand.h: +//# +//# Copyright (C) 2007 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program 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 General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id$ + +#ifndef LOFAR_BBSCONTROL_NEXTCHUNKCOMMAND_H +#define LOFAR_BBSCONTROL_NEXTCHUNKCOMMAND_H + +#include <BBSControl/Command.h> + +namespace LOFAR +{ +namespace BBS +{ + +class NextChunkCommand +{ +public: + // Accept a CommandHandler that wants to process \c *this. + virtual void accept(CommandHandler &handler) const; +}; + +} //# namespace BBS +} //# namespace LOFAR + +#endif diff --git a/CEP/BB/BBSControl/src/FinalizeCommand.cc b/CEP/BB/BBSControl/src/FinalizeCommand.cc new file mode 100644 index 0000000000000000000000000000000000000000..ad47e783e5e3398ab49f37f39d43ba4afe493ec8 --- /dev/null +++ b/CEP/BB/BBSControl/src/FinalizeCommand.cc @@ -0,0 +1,38 @@ +//# FinalizeCommand.cc: +//# +//# Copyright (C) 2007 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program 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 General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id$ + +#include <lofar_config.h> +#include <BBSControl/FinalizeCommand.h> +#include <BBSControl/CommandHandler.h> + +namespace LOFAR +{ +namespace BBS +{ + +void FinalizeCommand::accept(CommandHandler &handler) const +{ + handler.handle(*this); +} + +} //# namespace BBS +} //# namespace LOFAR diff --git a/CEP/BB/BBSControl/src/InitializeCommand.cc b/CEP/BB/BBSControl/src/InitializeCommand.cc new file mode 100644 index 0000000000000000000000000000000000000000..dd36a10ea52874750c4da4da9347bf9e31c0705c --- /dev/null +++ b/CEP/BB/BBSControl/src/InitializeCommand.cc @@ -0,0 +1,53 @@ +//# InitializeCommand.cc: +//# +//# Copyright (C) 2007 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program 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 General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id$ + +#include <lofar_config.h> +#include <BBSControl/InitializeCommand.h> +#include <BBSControl/CommandHandler.h> + +namespace LOFAR +{ +namespace BBS +{ +// Register InitializeCommand with the BBSStreamableFactory. Use an anonymous +// namespace. This ensures that the variable `dummy' gets its own private +// storage area and is only visible in this compilation unit. +namespace +{ + bool dummy = + BlobStreamableFactory::instance().registerClass<InitializeCommand>( + "InitializeCommand"); +} + +void InitializeCommand::accept(CommandHandler &handler) const +{ + handler.handle(*this); +} + +const string& InitializeCommand::classType() const +{ + static const string theType("InitializeCommand"); + return theType; +} + +} //# namespace BBS +} //# namespace LOFAR diff --git a/CEP/BB/BBSControl/src/NextChunkCommand.cc b/CEP/BB/BBSControl/src/NextChunkCommand.cc new file mode 100644 index 0000000000000000000000000000000000000000..64beacca5c5f73fb9ca12dfe2c40bd4c4a0d8064 --- /dev/null +++ b/CEP/BB/BBSControl/src/NextChunkCommand.cc @@ -0,0 +1,38 @@ +//# NextChunkCommand.cc: +//# +//# Copyright (C) 2007 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program 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 General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id$ + +#include <lofar_config.h> +#include <BBSControl/NextChunkCommand.h> +#include <BBSControl/CommandHandler.h> + +namespace LOFAR +{ +namespace BBS +{ + +void NextChunkCommand::accept(CommandHandler &handler) const +{ + handler.handle(*this); +} + +} //# namespace BBS +} //# namespace LOFAR