tasn pushed a commit to branch master.

http://git.enlightenment.org/bindings/cxx/eflxx.git/commit/?id=941ebc810510868fd299c45fea99302e84598c90

commit 941ebc810510868fd299c45fea99302e84598c90
Author: Andreas Volz <[email protected]>
Date:   Fri Nov 23 22:57:03 2012 +0000

    enable example code
    
    
    SVN revision: 79615
---
 eflxx_examples/src/eetxx/simple_write_read/read_eet.cpp | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/eflxx_examples/src/eetxx/simple_write_read/read_eet.cpp 
b/eflxx_examples/src/eetxx/simple_write_read/read_eet.cpp
index bac52e1..9c7736e 100644
--- a/eflxx_examples/src/eetxx/simple_write_read/read_eet.cpp
+++ b/eflxx_examples/src/eetxx/simple_write_read/read_eet.cpp
@@ -50,16 +50,18 @@ int main(int argc, char **argv)
   Eetxx::Document doc("writing_test.eet", EET_FILE_MODE_READ);
   Eetxx::List my_list (doc);
 
+  // read data by name
+  A *a = reinterpret_cast<A *> (my_list["A"]. get ());
 
-  //A *a = reinterpret_cast<A *> (my_list["A"]. get ());
+  cout << a->x << endl;
+  cout << a->d << endl;
+  cout << a->s << endl;
 
-  //cout << a->x << endl;
-  //cout << a->d << endl;
-  //cout << a->s << endl;
-
-  //int *i = reinterpret_cast<int *> (my_list["B"]. get ());
-  //cout << "i=" << *i << endl;
+       // read data by name
+  int *i = reinterpret_cast<int *> (my_list["B"]. get ());
+  cout << "i=" << *i << endl;
 
+  // read data in loop
   for_each (my_list.begin (),
             my_list.end (),
             display_eet_file_content());

-- 


Reply via email to