//***************************************************************************
// This source code is copyrighted 2002 by Google Inc.  All rights
// reserved.  You are given a limited license to use this source code for
// purposes of participating in the Google programming contest.  If you
// choose to use or distribute the source code for any other purpose, you
// must either (1) first obtain written approval from Google, or (2)
// prominently display the foregoing copyright notice and the following
// warranty and liability disclaimer on each copy used or distributed.
// 
// The source code and repository (the "Software") is provided "AS IS",
// with no warranty, express or implied, including but not limited to the
// implied warranties of merchantability and fitness for a particular
// use.  In no event shall Google Inc. be liable for any damages, direct
// or indirect, even if advised of the possibility of such damages.
//***************************************************************************


// For each document, write URL to stdout.

#include <iostream>
#include "goo-handler-parser.h"

using namespace std;

class CatURLParseHandler : public ParseHandler {
 public:
  virtual void NewDocument(const Document* doc) {
    cout << doc->url() << "\n";
  }
};

ParseHandler* MakeCatURLHandler() {
  return new CatURLParseHandler;
}
