Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / Web_Crawler / Web_Crawler.h
bloba63ba252d75b3553e17ba771aecda404ea12f9e1
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Web_Crawler.h
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
8 */
9 //=============================================================================
12 #ifndef _WEB_CRAWLER_H
13 #define _WEB_CRAWLER_H
15 #include "URL_Addr.h"
16 #include "HTTP_URL.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 // Forward declaration.
23 class URL_Visitor_Factory;
25 /**
26 * @class Web_Crawler
28 * @brief An abstraction for a Web Crawler.
30 * This class is a Facade that organizes the other classes in the
31 * solution, which include a factory that creates a visitor,
32 * which in turn embodies the appropriate visitation strategy.
34 class Web_Crawler
36 public:
37 /// Constructor.
38 Web_Crawler ();
40 /// Destructor.
41 ~Web_Crawler ();
43 /// Parses the command-line options and initializes the
44 /// <URL_Visitor_Factory>.
45 int open (int argc, ACE_TCHAR *argv[]);
47 /// Run the Web Crawler and carries out whatever visitation strategy
48 /// is configured. Returns -1 on failure and 0 on success.
49 int run ();
51 private:
52 /**
53 * Pointer to a factory that creates visitors that explore URLs and
54 * perform various tasks. Subclasses of <URL_Visitor_Factory>
55 * determine what happens during a visitation.
57 URL_Visitor_Factory *url_visitor_factory_;
60 #endif /* _WEB_CRAWLER_H */