Loading...
Searching...
No Matches
expert_container.hpp
Go to the documentation of this file.
//
// Copyright 2016 Ettus Research
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.hpp>
#include <uhd/experts/expert_nodes.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <memory>
#include <mutex>
namespace uhd { namespace experts {
enum auto_resolve_mode_t {
AUTO_RESOLVE_OFF,
AUTO_RESOLVE_ON_READ,
AUTO_RESOLVE_ON_WRITE,
AUTO_RESOLVE_ON_READ_WRITE
};
class UHD_API expert_container : private uhd::noncopyable, public node_retriever_t
{
public: // Methods
typedef std::shared_ptr<expert_container> sptr;
~expert_container() override{};
virtual const std::string& get_name() const = 0;
virtual void resolve_all(bool force = false) = 0;
virtual void resolve_from(const std::string& node_name) = 0;
virtual void resolve_to(const std::string& node_name) = 0;
virtual const node_retriever_t& node_retriever() const = 0;
virtual std::string to_dot() const = 0;
virtual void debug_audit() const = 0;
private:
const dag_vertex_t& lookup(const std::string& name) const override = 0;
dag_vertex_t& retrieve(const std::string& name) const override = 0;
friend class expert_factory;
static sptr make(const std::string& name);
virtual std::recursive_mutex& resolve_mutex() = 0;
virtual void add_data_node(
dag_vertex_t* data_node, auto_resolve_mode_t resolve_mode = AUTO_RESOLVE_OFF) = 0;
virtual void add_worker(worker_node_t* worker) = 0;
virtual void clear() = 0;
};
}} // namespace uhd::experts
uhd::experts::dag_vertex_t
Definition expert_nodes.hpp:40
uhd::experts::expert_container
Definition expert_container.hpp:26
uhd::experts::expert_container::debug_audit
virtual void debug_audit() const =0
uhd::experts::expert_container::resolve_from
virtual void resolve_from(const std::string &node_name)=0
uhd::experts::expert_container::resolve_all
virtual void resolve_all(bool force=false)=0
uhd::experts::expert_container::get_name
virtual const std::string & get_name() const =0
uhd::experts::expert_container::to_dot
virtual std::string to_dot() const =0
uhd::experts::expert_container::resolve_to
virtual void resolve_to(const std::string &node_name)=0
uhd::experts::expert_container::node_retriever
virtual const node_retriever_t & node_retriever() const =0
uhd::experts::expert_container::sptr
std::shared_ptr< expert_container > sptr
Definition expert_container.hpp:28
uhd::experts::expert_container::~expert_container
~expert_container() override
Definition expert_container.hpp:30
uhd::experts::expert_container::expert_factory
friend class expert_factory
Definition expert_container.hpp:138
uhd::experts::node_retriever_t
Definition expert_nodes.hpp:286
uhd::experts::worker_node_t
Definition expert_nodes.hpp:482
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
expert_nodes.hpp
uhd::experts
Definition expert_container.hpp:16
uhd::experts::auto_resolve_mode_t
auto_resolve_mode_t
Definition expert_container.hpp:18
uhd::experts::AUTO_RESOLVE_ON_WRITE
@ AUTO_RESOLVE_ON_WRITE
Definition expert_container.hpp:21
uhd::experts::AUTO_RESOLVE_ON_READ
@ AUTO_RESOLVE_ON_READ
Definition expert_container.hpp:20
uhd::experts::AUTO_RESOLVE_OFF
@ AUTO_RESOLVE_OFF
Definition expert_container.hpp:19
uhd::experts::AUTO_RESOLVE_ON_READ_WRITE
@ AUTO_RESOLVE_ON_READ_WRITE
Definition expert_container.hpp:22
uhd
Definition build_info.hpp:12
uhd::noncopyable
boost::noncopyable noncopyable
Definition noncopyable.hpp:45
noncopyable.hpp