From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a04162.html | 100 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/doxygen/nel/a04162.html (limited to 'docs/doxygen/nel/a04162.html') diff --git a/docs/doxygen/nel/a04162.html b/docs/doxygen/nel/a04162.html new file mode 100644 index 00000000..131d7b21 --- /dev/null +++ b/docs/doxygen/nel/a04162.html @@ -0,0 +1,100 @@ + + +NeL: command.h File Reference + + + +
+

command.h File Reference


Detailed Description

+Management of runtime command line processing

+

Id
command.h,v 1.28 2004/01/15 17:27:03 lecroart Exp
+ +

+Definition in file command.h. +

+#include "nel/misc/types_nl.h"
+#include <string>
+#include <map>
+#include <vector>
+#include <istream>
+#include "nel/misc/stream.h"
+#include "nel/misc/config_file.h"
+#include "nel/misc/log.h"
+ +

+Go to the source code of this file. + + + + + + + +

Namespaces

namespace  NLMISC

Defines

#define NLMISC_COMMAND(__name, __help, __args)
+


Define Documentation

+

+ + + + +
+ + + + + + + + + + + + + +
#define NLMISC_COMMAND__name,
__help,
__args   )  +
+
+ + + + + +
+   + + +

+Value:

struct __name##Class: public NLMISC::ICommand \
+{ \
+        __name##Class() : NLMISC::ICommand(#__name,__help,__args) { } \
+        virtual bool execute(const std::vector<std::string> &args, NLMISC::CLog &log, bool quiet, bool human); \
+}; \
+__name##Class __name##Instance; \
+bool __name##Class::execute(const std::vector<std::string> &args, NLMISC::CLog &log, bool quiet, bool human)
+
Create a function that can be call in realtime.

+Example:

// I want to create a function that compute the square of the parameter and display the result + NLMISC_COMMAND(square,"display the square of the parameter","<value>") + { + // check args, if there s not the right number of parameter, return bad + if(args.size() != 1) return false; + // get the value + uint32 val = atoi(args[0].c_str()); + // display the result on the displayer + log.displayNL("The square of %d is %d", val, val*val); + return true; + } +

+Please use the same casing than for the function (first letter in lower case and after each word first letter in upper case) ie: myFunction, step, orderByName, lookAtThis

+

Author:
Vianney Lecroart

+Nevrax France

+
Date:
2001
+ +

+Definition at line 78 of file command.h.

+


Generated on Tue Mar 16 06:42:20 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1