[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gomd-devel] <LIBGOMD> Added functions to parse infos
From: |
Gian Paolo Ghilardi |
Subject: |
[gomd-devel] <LIBGOMD> Added functions to parse infos |
Date: |
Tue, 2 Sep 2003 18:39:11 +0200 |
Hi all.
As requested by Matt & roeles, now libgomd includes two brand-new functions
to parse the infos.
- getMapOfInfos() => returns a C++ STL map with parsed infos as pairs
(strInfoName, strInfoValue)
- getStringOfInfos() => returns a string with the parsed infos (= the
contents of the map)
Please notice ATM there are no wrapper "pure" C functions (aka "pure" C
bindings) for these two new C++ functions.
I hope you like these functions... ;)
Notice these functions don't request infos + parse the values.
Info-requesting functions and parse-infos ones are logically separated.
### How to use them (excerpt from updated C++ example => check files in
contrib/c++/cpp) ###
//1)get the load value for all avaialble oM nodes
ret = lg->getInfo("get load ALL");
//2)parse the infos and print each parsed info on a new line
//notice the "<-->" info/value delimiter and the "\n >>> " delimiter used
to force the new line
ret = lg->getStringOfInfos(ret,"<-->","\n >>> ");
Byez.
CU.
<rejected>
<< CVS NOTES >>
IN contrib/c++/cpp/cppclient.cpp
(+) added call to new getStringOfInfos() function included in libgomd class.
IN lib/libiface.h
(+) cleanups
IN lib/libgomd.h/libgomd.cpp
(+) added two new C++ functions used to parse the infos: getMapOfInfos(),
getStringOfInfos().
Please see contrib/c++/cpp example to see the new function "in action"
:)
- [gomd-devel] <LIBGOMD> Added functions to parse infos,
Gian Paolo Ghilardi <=