00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _CJNP_TOPSTATDUMP_H_
00021 #define _CJNP_TOPSTATDUMP_H_ 1
00022
00023 #include <string>
00024 #include <stdexcept>
00025 #include "CjNP_LoggableBase.hh"
00026
00027 namespace jmitie {
00028 namespace corelib {
00029 class CjNP_topStatDump : public CjNP_LoggableBase {
00030
00031 public:
00032 std::string getName() const { return getName_static(); }
00033 static std::string getName_static() { return "topStatDump"; }
00034 std::string getProperty(const std::string & prop) const { return getProperty_static(prop); }
00035 static std::string getProperty_static(const std::string & opt) {
00036 if(opt=="desc") return "Prints various topology statistics, including: number of nodes, number of links, the number of nodes that are connected to themselves (self-loops), whether the topology is partitioned, and what fraction of node pairs are connected.";
00037 if(opt=="usage") return getProperty_static("desc") + "\nAvailable options:\n" + CjNP_LoggableBase::getProperty_static(opt);
00038 throw std::invalid_argument("CjNP_topStatDump::getProperty_static(" + opt + "): Unknown property requested.");
00039 }
00040
00041 CjNP_topStatDump(const std::string & args, const ctor_va_t & var_arg );
00042
00043 virtual void performAction( const action_va_t & opts );
00044
00045 ~CjNP_topStatDump();
00046
00047 };
00048 }
00049 }
00050
00051 #endif // _CJNP_TOPSTATDUMP_H_