diff options
Diffstat (limited to 'qt/driver.cxx')
-rw-r--r-- | qt/driver.cxx | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/qt/driver.cxx b/qt/driver.cxx index 395f0b5..79d4b4a 100644 --- a/qt/driver.cxx +++ b/qt/driver.cxx @@ -45,11 +45,16 @@ main (int argc, char* argv[]) QSharedPointer<employee> jane ( new employee ("Jane", - "Doe", + "Smith", QDate (1983, 1, 18), QByteArray ("\0xD7\0x00\0x14", 3), er)); + john->emails ().insert ("john_d@example.com"); + john->emails ().insert ("john.doe@simple.com"); + jane->emails ().insert ("jane_s@example.com"); + jane->emails ().insert ("jane.smith@simple.com"); + // Set the inverse side of the employee-employer relationship. // er->employees ().push_back (john); @@ -84,6 +89,11 @@ main (int argc, char* argv[]) QByteArray ("0x00\0x32\0x00\0x01\0x00", 5), er)); + john->emails ().insert ("john_d@example.com"); + john->emails ().insert ("john.doe@complex.com"); + jane->emails ().insert ("jane_s@example.com"); + jane->emails ().insert ("jane.smith@complex.com"); + // Set the inverse side of the employee-employer relationship. // er->employees ().push_back (john); @@ -121,12 +131,18 @@ main (int argc, char* argv[]) QSharedPointer<employer> pe (p->employer ().load ()); cout << p->first () << " " << p->last () << endl - << " born: " << p->born ().toString () << endl - << " public key length: " << p->public_key ().size () << endl - << " employer: " - << pe->name ().toAscii ().data () << endl; - - cout << endl; + << " born: " << p->born ().toString () << endl; + + for (emails::const_iterator j (p->emails ().begin ()), + e (p->emails ().end ()); j != e; ++j) + { + cout << " email: " << *j << endl; + } + + cout << " public key length: " << p->public_key ().size () << endl + << " employer: " + << pe->name () << endl + << endl; } t.commit (); |