diff options
Diffstat (limited to '')
7 files changed, 212 insertions, 0 deletions
diff --git a/nping/nping-dev/pythonscripts/TemplateGettersSetters.txt b/nping/nping-dev/pythonscripts/TemplateGettersSetters.txt new file mode 100644 index 0000000..fca7d91 --- /dev/null +++ b/nping/nping-dev/pythonscripts/TemplateGettersSetters.txt @@ -0,0 +1,25 @@ + +/* Prototypes */ +int setMETHNAME(TYPE val); +TYPE getMETHNAME(); + +/** Sets METHNAME. + * @return OP_SUCCESS on success and OP_FAILURE in case of error. */ +int CLASSNAME::setMETHNAME(TYPE val){ + + this->ATTRNAME=val; + + return OP_SUCCESS; + +} /* End of setMETHNAME() */ + + +/** Returns value of attribute ATTRNAME */ +TYPE CLASSNAME::getMETHNAME(){ + + return this->ATTRNAME; + +} /* End of getMETHNAME() */ + + + diff --git a/nping/nping-dev/pythonscripts/TemplateNpingOps.txt b/nping/nping-dev/pythonscripts/TemplateNpingOps.txt new file mode 100755 index 0000000..31adf3e --- /dev/null +++ b/nping/nping-dev/pythonscripts/TemplateNpingOps.txt @@ -0,0 +1,45 @@ + +Prototypes for NpingOps: + + int setMETHNAME(TYPE val); + TYPE getMETHNAME(); + bool issetMETHNAME(); + +Attributes for NpingOps: + + TYPE ATTRNAME; + bool ATTRNAME_set; + +Initialization for NpingOps::NpingOps() + + ATTRNAME=0; + ATTRNAME_set=false; + + +/** Sets METHNAME. + * @return OP_SUCCESS on success and OP_FAILURE in case of error. */ +int NpingOps::setMETHNAME(TYPE val){ + + ATTRNAME=val; + ATTRNAME_set=true; + + return OP_SUCCESS; + +} /* End of setMETHNAME() */ + + +/** Returns value of attribute ATTRNAME */ +TYPE NpingOps::getMETHNAME(){ + + return this->ATTRNAME; + +} /* End of getMETHNAME() */ + + +/* Returns true if option has been set */ +bool NpingOps::issetMETHNAME(){ + + return this->ATTRNAME_set; + +} /* End of issetMETHNAME() */ + diff --git a/nping/nping-dev/pythonscripts/addGettersSetters.py b/nping/nping-dev/pythonscripts/addGettersSetters.py new file mode 100644 index 0000000..b579471 --- /dev/null +++ b/nping/nping-dev/pythonscripts/addGettersSetters.py @@ -0,0 +1,28 @@ + + + +o = open("OutputGettersSetters.txt","a") + +classname = raw_input("Class Name: ") +my_range = raw_input("Number of attrs: ") +methname= [] +attrname = [] +attrtype= [] + +for i in range( int(my_range) ): + methname.append( raw_input("Method Name:") ) + attrname.append ( raw_input("Attr Name: ") ) + attrtype.append(raw_input("Attr type:") ) + + for line in open("TemplateGettersSetters.txt"): + line = line.replace("METHNAME",methname[i]) + line = line.replace("TYPE",attrtype[i]) + line = line.replace("ATTRNAME",attrname[i]) + line = line.replace("CLASSNAME",classname) + o.write(line) + + +o.close() + + + diff --git a/nping/nping-dev/pythonscripts/addManSectionEntry.py b/nping/nping-dev/pythonscripts/addManSectionEntry.py new file mode 100755 index 0000000..1d6c1e0 --- /dev/null +++ b/nping/nping-dev/pythonscripts/addManSectionEntry.py @@ -0,0 +1,43 @@ + +sectionname = raw_input("Section name: ") +hyphname = raw_input("Hyphened name: ") + + +o = open("OutputMan.txt","a") +for line in open("man-section-template.xml"): + line = line.replace("SECTION_NAME",sectionname) + line = line.replace("SECTION_HYPHENED_NAME",hyphname) + o.write(line) + + +my_range = raw_input("Number of options: ") +optformat = [] +optarg= [] +optdesc= [] +optname= [] + +for i in range( int(my_range) ): + optformat.append( raw_input("Option format (--tcp-connect): --") ) + optarg.append ( raw_input("Option arg (portnumber): ") ) + optdesc.append(raw_input("Option Description (TCP Connect Mode):") ) + optname.append(raw_input("Option name (tcp connect): ") ) + + + for line in open("man-section-entry-template.xml"): + line = line.replace("OPT_FORMAT",optformat[i]) + if( optarg[i] == ""): + line = line.replace("OPT_ARG","") + else: + line = line.replace("OPT_ARG","<replaceable>"+optarg[i]+"</replaceable>") + line = line.replace("OPT_DESC",optdesc[i]) + line = line.replace("OPT_NAME",optname[i]) + o.write(line) + +line1=" </variablelist>" +line2=" </refsect1>" +o.write(line1); +o.write(line2); +o.close() + + + diff --git a/nping/nping-dev/pythonscripts/addNpingOpsAttr.py b/nping/nping-dev/pythonscripts/addNpingOpsAttr.py new file mode 100755 index 0000000..5ed16d6 --- /dev/null +++ b/nping/nping-dev/pythonscripts/addNpingOpsAttr.py @@ -0,0 +1,12 @@ +methname = raw_input("Method name: ") +attrname = raw_input("Attr name: ") +attrtype = raw_input("Attr type: ") + + +o = open("Output.txt","a") +for line in open("TemplateNpingOps.txt"): + line = line.replace("ATTRNAME",attrname) + line = line.replace("METHNAME",methname) + line = line.replace("TYPE",attrtype) + o.write(line) +o.close() diff --git a/nping/nping-dev/pythonscripts/man-section-entry-template.xml b/nping/nping-dev/pythonscripts/man-section-entry-template.xml new file mode 100644 index 0000000..e61a3f0 --- /dev/null +++ b/nping/nping-dev/pythonscripts/man-section-entry-template.xml @@ -0,0 +1,25 @@ + <varlistentry> + <term> + <option>--OPT_FORMAT OPT_ARG</option> (OPT_DESC) + <indexterm significance="preferred"><primary><option>--OPT_FORMAT</option></primary></indexterm> + <indexterm significance="normal"><primary>OPT_NAME</primary></indexterm> + </term> + <listitem> + + +<para> blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah.</para> + + </listitem> + </varlistentry> diff --git a/nping/nping-dev/pythonscripts/man-section-template.xml b/nping/nping-dev/pythonscripts/man-section-template.xml new file mode 100644 index 0000000..ab41467 --- /dev/null +++ b/nping/nping-dev/pythonscripts/man-section-template.xml @@ -0,0 +1,34 @@ + + <refsect1 id="man-SECTION_HYPHENED_NAME"> + <title>SECTION_NAME</title> + +<para> blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah.</para> + +<para> blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah + blah blah blah blah blah blah blah blah blah blah blah blah.</para> + + <variablelist> + |