monotone

monotone Mtn Source Tree

Root/src/origin_type.hh

1// Copyright (C) 2009 Timothy Brownawell <tbrownaw@gmail.com>
2//
3// This program is made available under the GNU GPL version 2.0 or
4// greater. See the accompanying file COPYING for details.
5//
6// This program is distributed WITHOUT ANY WARRANTY; without even the
7// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8// PURPOSE.
9
10#ifndef __ORIGIN_TYPE_HH__
11#define __ORIGIN_TYPE_HH__
12
13// sanity.cc:type_to_string(type t) will need to match this
14namespace origin {
15 enum type {
16 internal,
17 network,
18 database,
19 workspace,
20 system,
21 user,
22 no_fault
23 };
24}
25
26// Something that knows where it came from.
27class origin_aware
28{
29public:
30 origin::type made_from;
31 origin_aware() : made_from(origin::internal) {}
32 origin_aware(origin::type m) : made_from(m) {}
33};
34
35#endif
36
37// Local Variables:
38// mode: C++
39// fill-column: 76
40// c-file-style: "gnu"
41// indent-tabs-mode: nil
42// End:
43// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status