#include "vom/object_base.hpp"
#include "vom/om.hpp"
#include "vom/singular_db.hpp"
+#include "vom/singular_db_funcs.hpp"
namespace VOM {
namespace ACL {
/**
* The key for a binding is the direction and the interface
*/
- typedef std::pair<direction_t, interface::key_type> key_t;
+ typedef std::pair<direction_t, interface::key_t> key_t;
/**
* Construct a new object matching the desried state
: m_direction(direction)
, m_itf(itf.singular())
, m_acl(acl.singular())
- , m_binding(0)
+ , m_binding(false)
{
m_evh.order();
}
: m_direction(o.m_direction)
, m_itf(o.m_itf)
, m_acl(o.m_acl)
- , m_binding(0)
+ , m_binding(o.m_binding)
{
}
*/
static void dump(std::ostream& os) { m_db.dump(os); }
+ static dependency_t order() { return m_evh.order(); }
+
private:
/**
* Class definition for listeners to OM events
class event_handler : public OM::listener, public inspect::command_handler
{
public:
- event_handler()
- {
- OM::register_listener(this);
- inspect::register_handler({ "acl-binding" }, "ACL bindings", this);
- }
+ event_handler();
+
virtual ~event_handler() = default;
/**
/**
* Show the object in the Singular DB
*/
- void show(std::ostream& os) { m_db.dump(os); }
+ void show(std::ostream& os) { db_dump(m_db, os); }
/**
* Get the sortable Id of the listener
template <typename LIST>
typename ACL::binding<LIST>::event_handler binding<LIST>::m_evh;
+
+namespace {
+const static dependency_t __attribute__((unused)) l2o = l2_binding::order();
+const static dependency_t __attribute__((unused)) l3o = l3_binding::order();
+};
};
-std::ostream& operator<<(
- std::ostream& os,
- const std::pair<direction_t, interface::key_type>& key);
+std::ostream& operator<<(std::ostream& os,
+ const std::pair<direction_t, interface::key_t>& key);
};
/*