#include <iostream>#include "Article.h"#include "ArtSpooler.h"#include "Logger.h"Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
Variables | |
| Logger | slog |
|
||||||||||||
|
Definition at line 28 of file tartspool.cc. References ArtSpooler::getSpooledArt(), Article::read(), ArtSpooler::spoolArt(), and ArtSpooler::storeBadArt().
00029 {
00030 try {
00031 string spoolDir("test");
00032 ifstream is;
00033 ArtSpooler spooler(spoolDir);
00034 Article a, *pA;
00035
00036 if (argc == 2) {
00037 is.open(*(argv + 1));
00038 a.read(is);
00039 is.close();
00040 spooler.spoolArt(a);
00041 } else {
00042 pA = spooler.getSpooledArt();
00043 if (pA != NULL) {
00044 spooler.storeBadArt(*pA);
00045 delete pA;
00046 }
00047 }
00048
00049 return (0);
00050 }
00051 catch(SystemError e) {
00052 e.print();
00053 return (1);
00054 }
00055 catch(Error e) {
00056 e.print();
00057 cerr << "Duplicate article" << endl;
00058 return (1);
00059 }
00060 catch(...) {
00061 cerr << "undefined error" << endl;
00062 return (1);
00063 }
00064 }
|
|
|
Definition at line 24 of file tartspool.cc. |
1.3.6-20040222