aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/nocscript/function_table.hpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-01-18 13:46:12 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-01-22 18:16:59 -0800
commit04722ba053fa6225c5a71d34316cbac093b87f66 (patch)
tree969b34beccf7a5a3c7de0ff73ac4490863c5da44 /host/lib/rfnoc/nocscript/function_table.hpp
parent5f3058e401bcd15143fd1015f62087f662db1384 (diff)
downloaduhd-04722ba053fa6225c5a71d34316cbac093b87f66.tar.gz
uhd-04722ba053fa6225c5a71d34316cbac093b87f66.tar.bz2
uhd-04722ba053fa6225c5a71d34316cbac093b87f66.zip
formatting: Apply clang-format to nocscript files
Diffstat (limited to 'host/lib/rfnoc/nocscript/function_table.hpp')
-rw-r--r--host/lib/rfnoc/nocscript/function_table.hpp43
1 files changed, 18 insertions, 25 deletions
diff --git a/host/lib/rfnoc/nocscript/function_table.hpp b/host/lib/rfnoc/nocscript/function_table.hpp
index 6d7ef4202..63125ab1b 100644
--- a/host/lib/rfnoc/nocscript/function_table.hpp
+++ b/host/lib/rfnoc/nocscript/function_table.hpp
@@ -6,48 +6,45 @@
//
#include "expression.hpp"
-#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
+#include <boost/shared_ptr.hpp>
#include <vector>
#ifndef INCLUDED_LIBUHD_RFNOC_NOCSCRIPT_FUNCTABLE_HPP
-#define INCLUDED_LIBUHD_RFNOC_NOCSCRIPT_FUNCTABLE_HPP
+# define INCLUDED_LIBUHD_RFNOC_NOCSCRIPT_FUNCTABLE_HPP
namespace uhd { namespace rfnoc { namespace nocscript {
class function_table
{
- public:
+public:
typedef boost::shared_ptr<function_table> sptr;
- typedef boost::function<expression_literal(expression_container::expr_list_type&)> function_ptr;
+ typedef boost::function<expression_literal(expression_container::expr_list_type&)>
+ function_ptr;
static sptr make();
- virtual ~function_table() {};
+ virtual ~function_table(){};
/*! Check if any function with a given name exists
*
* \returns True, if any function with name \p name is registered.
*/
- virtual bool function_exists(const std::string &name) const = 0;
+ virtual bool function_exists(const std::string& name) const = 0;
/*! Check if a function with a given name and list of argument types exists
*
* \returns True, if such a function is registered.
*/
- virtual bool function_exists(
- const std::string &name,
- const expression_function::argtype_list_type &arg_types
- ) const = 0;
+ virtual bool function_exists(const std::string& name,
+ const expression_function::argtype_list_type& arg_types) const = 0;
/*! Get the return type of a function with given name and argument type list
*
* \returns The function's return type
* \throws uhd::syntax_error if no such function is registered
*/
- virtual expression::type_t get_type(
- const std::string &name,
- const expression_function::argtype_list_type &arg_types
- ) const = 0;
+ virtual expression::type_t get_type(const std::string& name,
+ const expression_function::argtype_list_type& arg_types) const = 0;
/*! Calls the function \p name with the argument list \p arguments
*
@@ -56,11 +53,9 @@ class function_table
* \returns The return value of the called function
* \throws uhd::syntax_error if no such function is found
*/
- virtual expression_literal eval(
- const std::string &name,
- const expression_function::argtype_list_type &arg_types,
- expression_container::expr_list_type &arguments
- ) = 0;
+ virtual expression_literal eval(const std::string& name,
+ const expression_function::argtype_list_type& arg_types,
+ expression_container::expr_list_type& arguments) = 0;
/*! Register a new function
*
@@ -69,12 +64,10 @@ class function_table
* \param return_type The function's return value
* \param sig The function signature (list of argument types)
*/
- virtual void register_function(
- const std::string &name,
- const function_ptr &ptr,
- const expression::type_t return_type,
- const expression_function::argtype_list_type &sig
- ) = 0;
+ virtual void register_function(const std::string& name,
+ const function_ptr& ptr,
+ const expression::type_t return_type,
+ const expression_function::argtype_list_type& sig) = 0;
};
}}} /* namespace uhd::rfnoc::nocscript */