00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _CJNP_ADDLINK_H_
00021 #define _CJNP_ADDLINK_H_ 1
00022
00023 #include <cstdio>
00024 #include "CjNetworkProcess.hh"
00025 #include "CjNetworkDimensioner.hh"
00026 #include "CjLinkSelector.hh"
00027
00028 namespace jmitie {
00029 namespace corelib {
00030 class CjNP_addLink : public CjNetworkProcess {
00031
00032 private:
00033 ctor_va_t::CjDimFactory_t::Visitor_shared_ptr m_link_dimensioner;
00034 ctor_va_t::CjLinkSelectorFactory_t::Visitor_shared_ptr m_link_selector;
00035
00036
00037
00038 public:
00039 std::string getName() const { return getName_static(); }
00040 static std::string getName_static() { return "addLink"; }
00041 std::string getProperty(const std::string & prop) const { return getProperty_static(prop); }
00042 static std::string getProperty_static(const std::string & opt) {
00043 if(opt=="desc") return "Add a link between two nodes, selecting the pair with a link selector.";
00044 if(opt=="usage") return getProperty_static("desc") + "\n" \
00045 "link_selector_name\tThe name of the link selector to use to chose a node pair which to connect.\n"\
00046 "link_dimensioner_name\tThe name of the link dimensioner to use on the new link.\n";
00047 throw std::invalid_argument("CjNP_addLink::getProperty_static(" + opt + "): Unknown property requested.");
00048 }
00049
00050 CjNP_addLink(const std::string & args, const ctor_va_t & var_arg );
00051 virtual void performAction( const action_va_t & opts );
00052
00053 ~CjNP_addLink() { }
00054
00055 protected:
00056
00057 };
00058 }
00059 }
00060
00061 #endif // _CJNP_ADDLINK_H_