Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl Xmlize
ArrayCtrl Xmlize [message #38423] Sat, 15 December 2012 07:40
deep is currently offline  deep
Messages: 196
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

Previous Topic: GridCtrl copy/paste extra columns
Next Topic: To set data in GridCtrl's Indicator
Goto Forum:
  


Current Time: Tue Sep 17 04:18:10 CEST 2019

Total time taken to generate the page: 0.00528 seconds