DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dbe::config::api::graph::linked::by Namespace Reference

Functions

template<typename T >
std::vector< T > object (tref const &item)
 

Function Documentation

◆ object()

template<typename T >
std::vector< T > dbe::config::api::graph::linked::by::object ( tref const & item)

Get objects referenced by a given object

e.g. A-c->B , and another A-c->D returns {B,D} but A-c->B , A-d->B return {B}

Parameters
itemis the object for which objects must be retrieved
Returns
a vector of linked objects

Definition at line 308 of file config_api_graph.cpp.

309{
310 std::vector<T> links = through::attributes<T> ( o );
311 std::vector<T> rlinks = through::relations<T> ( o );
312
313 if ( not rlinks.empty() )
314 {
315 links.insert ( links.end(), rlinks.begin(), rlinks.end() );
316 }
317
318 links.erase ( std::unique ( links.begin(), links.end() ), links.end() );
319
320 return links;
321}