From 806209bbd36fc5b876c68b30b158923b774e2455 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 1 Mar 2016 00:36:29 -0500 Subject: [PATCH] Extensions: Added stub --- src/Extensions.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++++ src/Extensions.h | 47 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 src/Extensions.cpp create mode 100644 src/Extensions.h diff --git a/src/Extensions.cpp b/src/Extensions.cpp new file mode 100644 index 00000000..df5d2daf --- /dev/null +++ b/src/Extensions.cpp @@ -0,0 +1,52 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// http://www.opensource.org/licenses/mit-license.php +// +//////////////////////////////////////////////////////////////////////////////// + +#include +#include + +//////////////////////////////////////////////////////////////////////////////// +void Extensions::initialize () +{ +} + +//////////////////////////////////////////////////////////////////////////////// +std::vector & Extensions::buildExtensionArgs (std::vector & args) const +{ + return args; +} + +//////////////////////////////////////////////////////////////////////////////// +int Extensions::callExtension ( + const std::string& script, + const std::vector & input, + std::vector & output) const +{ + int status = 0; + + return status; +} + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/Extensions.h b/src/Extensions.h new file mode 100644 index 00000000..d78ff431 --- /dev/null +++ b/src/Extensions.h @@ -0,0 +1,47 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// http://www.opensource.org/licenses/mit-license.php +// +//////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDED_EXTENSIONS +#define INCLUDED_EXTENSIONS + +#include +#include + +class Extensions +{ +public: + Extensions () = default; + void initialize (); + +private: + std::vector & buildExtensionArgs (std::vector &) const; + int callExtension (const std::string&, const std::vector &, std::vector &) const; + +private: + std::vector _scripts {}; +}; + +#endif