proj home

Files   Classes   Functions   Hierarchy  

main.cpp File Reference

#include <iostream>
#include <visitbase.h>
#include <visitdataA.h>
#include <visitdataB.h>
#include <visitprint.h>
#include <visitdataC.h>

Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

void test03 ()
int main (int argc, char **argv)


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 40 of file main.cpp.

References test03().

00041 {
00042   test03();
00043 
00044 
00045   return 0;
00046 }

void test03 (  ) 

Definition at line 12 of file main.cpp.

00013 {
00014   visitbase *pA = new visitdataA(13);
00015   visitbase *pB = new visitdataB("cat");
00016 
00017   visitbase *f = new visitprint();
00018 
00019   cout << "Try A(print)" << endl;
00020   (*pA)(f);
00021   cout << "Now try the reverse print(A)" << endl;
00022   (*f)(pA);
00023   
00024   cout << "Try B(print)" << endl;
00025   (*pB)(f);
00026   cout << "Now try the reverse print(B)" << endl;
00027   (*f)(pB);
00028   
00029   cout << endl;
00030   cout << "Now a new data member C is implemented" << endl;
00031   cout << "It has to work with the exiting print operator" << endl;
00032 
00033   visitbase *pC = new visitdataC(1,3);
00034   cout << "Try matching a print and a C with print(C)" << endl;
00035   (*f)(pC);
00036 
00037 }


Generated on Fri Mar 4 00:49:33 2011 for Chelton Evans Source by  doxygen 1.5.8