#include <lestes/std/list.hh>#include <iostream>Go to the source code of this file.
Defines | |
| #define | LENGTHOFARRAY(ar) (sizeof(ar)/sizeof(ar[0])) |
Functions | |
| int | main () |
| #define LENGTHOFARRAY | ( | ar | ) | (sizeof(ar)/sizeof(ar[0])) |
Definition at line 31 of file list.test.cc.
| int main | ( | void | ) |
Definition at line 35 of file list.test.cc.
00036 { 00037 typedef list<int> ltype; 00038 ptr<ltype> ll = ltype::create(); 00039 ll->push_back(3); 00040 ll->push_back(1); 00041 ll->push_back(-1); 00042 ptr<ltype> l = ltype::create(ll); 00043 00044 for ( ltype::iterator i = l->begin(); i != l->end(); ++i ) 00045 ::std::cout << *i << ::std::endl; 00046 00047 typedef list< srp<object> > ltype2; 00048 ptr<ltype2> ll2 = ltype2::create(); 00049 ll2->push_back(ll); 00050 ll2->push_back(l); 00051 ll2->push_back(NULL); 00052 ll2->push_back(ll2); 00053 ptr<ltype2> l2 = ltype2::create(ll2); 00054 00055 for ( ltype2::iterator i = l2->begin(); i != l2->end(); ++i ) 00056 ::std::cout << (*i ? i->operator->() : 0) << ::std::endl; 00057 00058 return 0; 00059 }
1.5.1-20070107