Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl Xmlize
ArrayCtrl Xmlize [message #38423] |
Sat, 15 December 2012 07:40 |
|
deep
Messages: 265 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Hi,
I required ArrayCtrl Xmlize function.
I added this function in uppsrc/CtrlLib/ArrayCtrl.h file.
In case it is useful to someone. Changes ...
Add this line to uppscr/CtrlLib/ArrayCtrl.h
template<> void Xmlize(XmlIO& xml, ArrayCtrl& a) ;
Add these line to uppscr/CtrlLib/ArrayCtrl.cpp
template<> void Xmlize(XmlIO& xml, ArrayCtrl& a) {
Vector< Vector<Value> > v0;
if(xml.IsLoading()) {
xml("data", v0);
for( int i = 0 ; i < v0.GetCount() ; i++){
Vector<Value> v1 = v0[i];
a.Add(v1);
}
} else {
for (int i=0; i < a.GetCount() ;i++) {
Vector<Value> v1 = a.GetLine(i);
v0.Add(v1);
}
xml("data", v0);
}
};
Warm Regards
Deepak
[Updated on: Tue, 02 April 2013 11:45] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Sep 20 04:03:21 CEST 2024
Total time taken to generate the page: 0.03441 seconds
|