00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _CJNS_NODE_
00021 #define _CJNS_NODE_ 1
00022
00023 #include "CjNodeSelector.hh"
00024 #include <string>
00025 #include "JLOG.hh"
00026
00027 namespace jmitie {
00028 namespace corelib {
00029 class CjNS_node: public CjNodeSelector {
00030 protected:
00031 unsigned int m_node;
00032
00033 public:
00034 static std::string getName_static() { return "node"; }
00035 virtual std::string getName() const { return getName_static(); }
00036 std::string getProperty(const std::string & prop) const { return getProperty_static(prop); }
00037 static std::string getProperty_static(const std::string & opt) {
00038 if(opt=="desc") return "Selects the node specified as an argument.";
00039 if(opt=="usage") return getProperty_static("desc") + "\n" +
00040 getName_static() + "=M\tAlways selects node number M.\n";
00041 throw std::invalid_argument("CjNS_node::getProperty_static(" + opt + "): Unknown property requested.");
00042 }
00043
00044 CjNS_node(std::string args, const ctor_va_t & );
00045 virtual bool selectNode( select_arg_t &, unsigned int & node );
00046 virtual ~CjNS_node() { JLOG(5, std::cout << "CjNS_node being destroyed." << std::endl; ) };
00047
00048 };
00049 }
00050 }
00051
00052 #endif // _CJNS_NODE_