OpFlex Framework
1.7.0
|
Inspect the state of a a managed object database using the inspector protocol. More...
#include <opflex/ofcore/InspectorClient.h>
Public Member Functions | |
virtual | ~InspectorClient () |
Destroy the inspector client. | |
virtual void | setFollowRefs (bool enabled)=0 |
Follow references for retrieved objects. More... | |
virtual void | setRecursive (bool enabled)=0 |
Download the whole subtree rather than just the specific object for each query. More... | |
virtual void | addQuery (const std::string &subject, const modb::URI &uri)=0 |
Query for a particular managed object. More... | |
virtual void | addClassQuery (const std::string &subject)=0 |
Query for all managed objects of a particular type. More... | |
virtual void | execute ()=0 |
Attempt to execute all queued inspector commands. | |
virtual void | dumpToFile (FILE *file)=0 |
Dump the current MODB view to the specified file using the Opflex JSON wire format. More... | |
virtual size_t | loadFromFile (FILE *file)=0 |
Load a set of managed objects from the given file into the inspector's MODB view in order to display them. More... | |
virtual void | prettyPrint (std::ostream &output, bool tree=true, bool includeProps=true, bool utf8=true, size_t truncate=0)=0 |
Pretty print the current MODB to the provided output stream. More... | |
Static Public Member Functions | |
static InspectorClient * | newInstance (const std::string &name, const modb::ModelMetadata &model) |
Allocate a new inspector client for the given socket name. More... | |
Inspect the state of a a managed object database using the inspector protocol.
Can query for objects, dump the database state, and other simple tasks.
Use the client by queuing a list of commands, which will then be executed in sequence. Commands will operate to change the state of the client's view of the managed object database by querying the server. The client's view can then either be pretty-printed for viewing by a user or dumped to a file.
|
pure virtual |
Query for all managed objects of a particular type.
subject | the subject (class name) to query for |
|
pure virtual |
Query for a particular managed object.
subject | the subject (class name) of the object |
uri | the URI of the object |
|
pure virtual |
Dump the current MODB view to the specified file using the Opflex JSON wire format.
file | the file name to write to |
|
pure virtual |
Load a set of managed objects from the given file into the inspector's MODB view in order to display them.
file | the file to load from |
|
static |
Allocate a new inspector client for the given socket name.
name | A path name for the unix socket |
model | the model metadata object |
|
pure virtual |
Pretty print the current MODB to the provided output stream.
output | the output stream to write to |
tree | print in a tree format |
includeProps | include the object properties |
utf8 | output tree using UTF-8 box drawing |
truncate | truncate lines to the specified number of characters. 0 means do not truncate. |
|
pure virtual |
Follow references for retrieved objects.
enabled | set to true to enable reference following |
|
pure virtual |
Download the whole subtree rather than just the specific object for each query.
enabled | set to true to enable recursive downloading |