Skip to content
Snippets Groups Projects
Commit 2bf7fcb4 authored by Adam Wardynski's avatar Adam Wardynski
Browse files

Function to return function returning Position(0)

parent ffafa97f
Branches
Tags
No related merge requests found
...@@ -27,6 +27,7 @@ endif(WIN32) ...@@ -27,6 +27,7 @@ endif(WIN32)
SET(libwccl_STAT_SRC SET(libwccl_STAT_SRC
exception.cpp exception.cpp
ops/action.cpp
ops/formatters.cpp ops/formatters.cpp
ops/functions/bool/iteration.cpp ops/functions/bool/iteration.cpp
ops/functions/bool/iterations/atleast.cpp ops/functions/bool/iterations/atleast.cpp
......
#include <libwccl/ops/action.h>
#include <libwccl/ops/functions/constant.h>
namespace Wccl {
namespace detail {
boost::shared_ptr<Function<Position> > CurrentPos()
{
static boost::shared_ptr<Function<Position> > current(
new Constant<Position>(Position(0)));
return current;
}
} /* end ns detail */
} /* end ns Wccl */
#ifndef LIBWCCL_OPS_ACTION_H #ifndef LIBWCCL_OPS_ACTION_H
#define LIBWCCL_OPS_ACTION_H #define LIBWCCL_OPS_ACTION_H
#include <boost/shared_ptr.hpp>
#include <boost/assert.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <libwccl/ops/expression.h>
#include <libwccl/values/value.h>
#include <libwccl/ops/actionexeccontext.h> #include <libwccl/ops/actionexeccontext.h>
#include <libwccl/ops/function.h>
namespace Wccl { namespace Wccl {
...@@ -28,6 +23,10 @@ public: ...@@ -28,6 +23,10 @@ public:
virtual Bool execute(const ActionExecContext& context) const = 0; virtual Bool execute(const ActionExecContext& context) const = 0;
}; };
namespace detail {
boost::shared_ptr<Function<Position> > CurrentPos();
}
} /* end ns Wccl */ } /* end ns Wccl */
#endif // LIBWCCL_OPS_ACTION_H #endif // LIBWCCL_OPS_ACTION_H
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment