|
CatapultServer
v0.5.0.1 (Elephant)
|
A base class for a tool that performs a network census by communicating with all nodes. More...


Public Types | |
| using | NodeInfoPointer = std::shared_ptr< TNodeInfo > |
| A node info shared pointer. More... | |
| using | NodeInfoFuture = thread::future< NodeInfoPointer > |
| A node info shared pointer future. More... | |
Public Member Functions | |
| NetworkCensusTool (const std::string &censusName) | |
| Creates a census tool with census name (censusName). More... | |
| std::string | name () const override final |
| Returns name of the command. More... | |
| void | prepareOptions (OptionsBuilder &optionsBuilder, OptionsPositional &positional) override final |
| Prepare named (optionsBuilder) and positional options of the tool. More... | |
| int | run (const Options &) override final |
| Run the tool passing options collected from the command line. More... | |
Public Member Functions inherited from catapult::tools::Tool | |
| virtual bool | allowUnregisteredOptions () const |
| Tool should return true if command line parser should allow unregistered options. More... | |
| virtual CommandParser * | subCommandParser (const Options &) const |
| Tool should return sub command parser. More... | |
Public Member Functions inherited from catapult::tools::CommandParser | |
| virtual | ~CommandParser ()=default |
Private Member Functions | |
| NodeInfoFuture | createNodeInfoFuture (MultiNodeConnector &connector, const ionet::Node &node) |
| virtual std::vector< thread::future< bool > > | getNodeInfoFutures (thread::IoThreadPool &pool, ionet::PacketIo &io, TNodeInfo &nodeInfo)=0 |
| Gets all futures to fill nodeInfo using pool and io. More... | |
| virtual size_t | processNodeInfos (const std::vector< NodeInfoPointer > &nodeInfos)=0 |
| Processes nodeInfos after all futures complete. More... | |
Private Attributes | |
| std::string | m_censusName |
| std::string | m_resourcesPath |
A base class for a tool that performs a network census by communicating with all nodes.
| using catapult::tools::NetworkCensusTool< TNodeInfo >::NodeInfoFuture = thread::future<NodeInfoPointer> |
A node info shared pointer future.
| using catapult::tools::NetworkCensusTool< TNodeInfo >::NodeInfoPointer = std::shared_ptr<TNodeInfo> |
A node info shared pointer.
|
inlineexplicit |
Creates a census tool with census name (censusName).
|
inlineprivate |


|
privatepure virtual |
Gets all futures to fill nodeInfo using pool and io.

|
inlinefinaloverridevirtual |
Returns name of the command.
Implements catapult::tools::CommandParser.
|
inlinefinaloverridevirtual |
Prepare named (optionsBuilder) and positional options of the tool.
Implements catapult::tools::CommandParser.
|
privatepure virtual |
Processes nodeInfos after all futures complete.

|
inlinefinaloverridevirtual |
Run the tool passing options collected from the command line.
Implements catapult::tools::Tool.

|
private |
|
private |