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

Archive Download this file

Branches

Tags

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