30 #ifndef CFI_DISCOVER_H
31 #define CFI_DISCOVER_H
97 std::map<std::string, std::vector<DiscoverWeakPointer> > objects;
115 void fetch(
csr name, std::vector<void *> & results);
119 #define DISCOVERABLE \
120 VICI::cfi::DiscoveryMgr::instance().save( __PRETTY_FUNCTION__, \
121 (discover.reset( new VICI::cfi::DiscoverPointer( this )), discover) );
void fetch(csr name, std::vector< void * > &results)
Get a list of objects with a class name.
Definition: discover.cpp:53
A mixin class that makes its owner discoverable.
Definition: discover.h:80
DiscoverPointer()
Default constructor.
Definition: discover.h:58
Manager for discoverable objects.
Definition: discover.h:94
static DiscoveryMgr & instance()
Return a reference to the DiscoveryMgr.
Definition: discover.cpp:34
DiscoverSharedPointer discover
A shared pointer that references back to the discoverable object.
Definition: discover.h:84
void save(const char *prettyName, DiscoverSharedPointer p)
Save a discoverable object.
Definition: discover.cpp:42
std::shared_ptr< DiscoverPointer > DiscoverSharedPointer
A shared pointer that will be owned by a discoverable object.
Definition: discover.h:68
std::weak_ptr< DiscoverPointer > DiscoverWeakPointer
A weak pointer that will be held by the DiscoveryMgr.
Definition: discover.h:71
DiscoverPointer(void *a)
Constructor.
Definition: discover.h:64
Holds a pointer to a discoverable object.
Definition: discover.h:52
const std::string & csr
short cut for string constants
Definition: vici.h:80
void * addr
Pointer to a discoverable object.
Definition: discover.h:55