monotone

monotone Mtn Source Tree

Root/vocab_terms.hh

1// Copyright (C) 2002 Graydon Hoare <graydon@pobox.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// this fragment is included into both vocab.hh and vocab.cc,
11// in order to facilitate external instantiation of most of the
12// vocabulary, minimize code duplication, speed up compilation, etc.
13
14ATOMIC_NOVERIFY(external); // "external" string in unknown system charset
15ATOMIC_NOVERIFY(utf8); // unknown string in UTF8 charset
16ATOMIC(ace); // unknown string in ACE form
17ATOMIC(symbol); // valid basic io symbol (alphanumeric or _ chars)
18
19ATOMIC(path_component); // piece of a path (see paths.hh)
20
21ATOMIC_NOVERIFY(id); // hash of data
22ATOMIC_NOVERIFY(data); // meaningless blob
23ATOMIC_NOVERIFY(delta); // xdelta between 2 datas
24ATOMIC_NOVERIFY(inodeprint); // fingerprint of an inode
25
26ATOMIC_NOVERIFY(branch_name); // utf-8
27ATOMIC_NOVERIFY(globish); // kinda like a glob, see globish.hh (also, utf-8)
28
29ATOMIC(cert_name); // symbol-of-your-choosing
30ATOMIC_NOVERIFY(cert_value); // symbol-of-your-choosing
31
32// some domains: "database" (+ default_server, default_pattern),
33// server_key (+ servername/key)
34// branch_alias (+ short form/long form)
35// trust_seed (+ branch/seed)
36ATOMIC_NOVERIFY(var_domain); // symbol-of-your-choosing
37ATOMIC_NOVERIFY(var_name); // symbol-of-your-choosing
38ATOMIC_NOVERIFY(var_value); // symbol-of-your-choosing
39
40ATOMIC(rsa_keypair_id); // keyname@domain.you.own
41ATOMIC_NOVERIFY(rsa_pub_key); // some nice numbers
42ATOMIC_NOVERIFY(rsa_priv_key); // some nice numbers
43ATOMIC_NOVERIFY(rsa_sha1_signature); // some other nice numbers
44ATOMIC_NOVERIFY(rsa_oaep_sha_data);
45
46ATOMIC(netsync_session_key); // key for netsync session HMAC
47ATOMIC(netsync_hmac_value); // 160-bit SHA-1 HMAC
48
49ATOMIC_NOVERIFY(attr_key);
50ATOMIC_NOVERIFY(attr_value);
51
52DECORATE(revision); // thing associated with a revision
53DECORATE(roster); // thing associated with a roster
54DECORATE(manifest); // thing associated with a manifest
55DECORATE(file); // thing associated with a file
56DECORATE(key); // thing associated with a key
57DECORATE(epoch); // thing associated with an epoch
58
59ENCODING(gzip); // thing which is gzipped
60ENCODING(hexenc); // thing which is hex-encoded
61ENCODING(base64); // thing which is base64-encoded
62ENCODING(arc4); // thing which is arc4-encrypted
63
64ATOMIC_NOVERIFY(prefix); // raw encoding of a merkle tree prefix
65ATOMIC_NOVERIFY(merkle); // raw encoding of a merkle tree node
66
67// instantiate those bits of the template vocabulary actually in use.
68
69EXTERN template class hexenc<id>;
70EXTERN template class revision< hexenc<id> >;
71EXTERN template class roster< hexenc<id> >;
72EXTERN template class manifest< hexenc<id> >;
73EXTERN template class file< hexenc<id> >;
74EXTERN template class key< hexenc<id> >;
75EXTERN template class epoch< hexenc<id> >;
76
77EXTERN template class hexenc<inodeprint>;
78
79EXTERN template class hexenc<data>;
80EXTERN template class epoch< hexenc<data> >;
81
82EXTERN template class gzip<data>;
83EXTERN template class base64< gzip<data> >;
84
85EXTERN template class revision< data >;
86EXTERN template class roster< data >;
87EXTERN template class manifest< data >;
88EXTERN template class file< data >;
89
90EXTERN template class gzip<delta>;
91EXTERN template class base64< gzip<delta> >;
92
93EXTERN template class roster< delta >;
94EXTERN template class manifest< delta >;
95EXTERN template class file< delta >;
96
97EXTERN template class arc4<rsa_priv_key>;
98EXTERN template class base64< arc4<rsa_priv_key> >;
99EXTERN template class base64< rsa_pub_key >;
100EXTERN template class base64< rsa_priv_key >;
101EXTERN template class base64< rsa_sha1_signature >;
102EXTERN template class hexenc< rsa_sha1_signature >;
103EXTERN template class base64< cert_value >;
104
105EXTERN template class base64< var_name >;
106EXTERN template class base64< var_value >;
107
108EXTERN template class hexenc<prefix>;
109EXTERN template class base64<merkle>;
110EXTERN template class base64<data>;
111
112// instantiate those bits of the stream operator vocab (again) actually in
113// use. "again" since stream operators are friends, not members.
114
115EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc<id> const &);
116EXTERN template std::ostream & operator<< <>(std::ostream &, revision< hexenc<id> > const &);
117EXTERN template std::ostream & operator<< <>(std::ostream &, roster< hexenc<id> > const &);
118EXTERN template std::ostream & operator<< <>(std::ostream &, manifest< hexenc<id> > const &);
119EXTERN template std::ostream & operator<< <>(std::ostream &, file< hexenc<id> > const &);
120EXTERN template std::ostream & operator<< <>(std::ostream &, epoch< hexenc<id> > const &);
121
122EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc<inodeprint> const &);
123
124EXTERN template std::ostream & operator<< <>(std::ostream &, roster<data> const &);
125EXTERN template std::ostream & operator<< <>(std::ostream &, manifest<data> const &);
126
127EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc<data> const &);
128EXTERN template std::ostream & operator<< <>(std::ostream &, epoch< hexenc<data> > const &);
129
130EXTERN template std::ostream & operator<< <>(std::ostream &, gzip<data> const &);
131EXTERN template std::ostream & operator<< <>(std::ostream &, base64< gzip<data> > const &);
132EXTERN template std::ostream & operator<< <>(std::ostream &, revision< base64< gzip<data> > > const &);
133EXTERN template std::ostream & operator<< <>(std::ostream &, manifest< base64< gzip<data> > > const &);
134EXTERN template std::ostream & operator<< <>(std::ostream &, file< base64< gzip<data> > > const &);
135
136EXTERN template std::ostream & operator<< <>(std::ostream &, gzip<delta> const &);
137EXTERN template std::ostream & operator<< <>(std::ostream &, base64< gzip<delta> > const &);
138EXTERN template std::ostream & operator<< <>(std::ostream &, manifest< base64< gzip<delta> > > const &);
139EXTERN template std::ostream & operator<< <>(std::ostream &, file< base64< gzip<delta> > > const &);
140
141EXTERN template std::ostream & operator<< <>(std::ostream &, arc4<rsa_priv_key> const &);
142EXTERN template std::ostream & operator<< <>(std::ostream &, base64< arc4<rsa_priv_key> > const &);
143EXTERN template std::ostream & operator<< <>(std::ostream &, base64< rsa_pub_key > const &);
144EXTERN template std::ostream & operator<< <>(std::ostream &, base64< rsa_sha1_signature > const &);
145EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc< rsa_sha1_signature > const &);
146EXTERN template std::ostream & operator<< <>(std::ostream &, base64< cert_value > const &);
147
148EXTERN template std::ostream & operator<< <>(std::ostream &, hexenc<prefix> const &);
149EXTERN template std::ostream & operator<< <>(std::ostream &, base64<merkle> const &);
150
151
152// Local Variables:
153// mode: C++
154// fill-column: 76
155// c-file-style: "gnu"
156// indent-tabs-mode: nil
157// End:
158// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
159

Archive Download this file

Branches

Tags

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