ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/GoogleTron/Command.hpp
Revision: 689
Committed: 2006-03-07T02:13:52-08:00 (19 years, 3 months ago) by douglas
File size: 812 byte(s)
Log Message:
Oh, how I love operator overloading!

File Contents

# Content
1 // Command
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Command_hpp_
8 #define _Command_hpp_
9
10 #include <cxx/platform.hpp>
11
12 #ifdef MENES_PRAGMA_ONCE
13 #pragma once
14 #endif
15
16 #include <api/locks.hpp>
17
18 #include <queue> // XXX: no ext::Queue yet :(
19
20 #include "Url.hpp"
21
22 struct Command : public ext::ReferenceCounted {
23 const cse::String root;
24 protected:
25 Command(const cse::String &root) : root(root) {}
26 public:
27 operator const cse::String &() { return root; }
28 };
29
30 class CommandRunner
31 {
32 protected:
33 const cse::String &sitemap;
34 const cse::String &base;
35 std::queue<Url> &queue;
36 api::ThreadMutex &queueLock;
37 CommandRunner(const cse::String &sitemap, const cse::String &base, std::queue<Url> &queue, api::ThreadMutex &queueLock) : sitemap(sitemap), base(base), queue(queue), queueLock(queueLock) {}
38 };
39
40 #endif//_Command_hpp_

Properties

Name Value
svn:eol-style native
svn:keywords Id