00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _CJNP_GROW_H_
00021 #define _CJNP_GROW_H_ 1
00022
00023 #include <string>
00024 #include "CjNetworkProcess.hh"
00025 #include "CjNetworkDimensioner.hh"
00026 #include "CjNodeSelector.hh"
00027
00028 namespace jmitie {
00029 namespace corelib {
00030 class CjNP_grow : public CjNetworkProcess {
00031
00032 private:
00033 ctor_va_t::CjDimFactory_t::Visitor_shared_ptr m_link_dimensioner;
00034 ctor_va_t::CjNodeSelectorFactory_t::Visitor_shared_ptr m_dest_selector;
00035
00036 public:
00037 std::string getName() const { return getName_static(); }
00038 static std::string getName_static() { return "grow"; }
00039 std::string getProperty(const std::string & prop) const { return getProperty_static(prop); }
00040 static std::string getProperty_static(const std::string & opt) {
00041 if(opt=="desc") return "Adds a single node to the network (assuming -maxSize hasn't been exceeded) and conects it to the existing nodes with the specified node selector.";
00042 if(opt=="usage") return getProperty_static("desc") + "\n" \
00043 "destination_selector_name\tThe node selector which will choose which node the new node will connect to.\n"\
00044 "link_dimensioner_name\tThe name of the link dimensioner to use on the new link.\n";
00045 throw std::invalid_argument("CjNP_grow::getProperty_static(" + opt + "): Unknown property requested.");
00046 }
00047
00048 CjNP_grow(const std::string & args, const ctor_va_t & var_arg );
00049 virtual void performAction( const action_va_t & opts );
00050
00051 ~CjNP_grow() { }
00052
00053 };
00054 }
00055 }
00056
00057 #endif // _CJNP_GROW_H_