File: HACKING

package info (click to toggle)
atlas-cpp 0.5.98-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,652 kB
  • ctags: 2,284
  • sloc: sh: 8,305; cpp: 6,372; python: 1,471; makefile: 216
file content (96 lines) | stat: -rw-r--r-- 4,013 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Read this carefully before working on Atlas-C++.

I   On writing templates:

 - put the declaration for the template class X in X.h
 - put the definitions for the template class X in X_impl.h
 - put any instantiations of X in X.cpp (or X.cc?), e.g.:
     template class X<int>;

This avoids duplicated instantiations and speeds up compile time.
Note that this doesn't apply for absolutely all classes. If unsure,
talk to somebody who knows more about templates.

II  On filenames:

In 0.4.0, C++ implementation filenames will end in .cc.
In 0.4.x, this may change to .cpp.

In 0.4.x:
 - files will have CapitalisedFilenames.extension
 - headers will end in .h

In 0.5.x and up:
 - C++ implementation filenames will end in .cpp
 - headers will end in .h
 - files may be lower cased. This is up to debate.

III On member names:

In 0.4.x member function names will be CapitalisedNames(). There are no
restrictions to the naming of member variables.
In 0.5.x member functions will be lowerThenUpperCased(). Member
variables will be prefixed with m_, and also be lowerThenUpperCased.
-------e.g.
0.4.x: class Budgie { void CleanFeathers(); Feather* dirty_feathers; };
0.5.x: class Budgie { void cleanFeathers(); Feather* m_dirtyFeathers; };
-----------

IV  On ChangeLog entries:

Write a change log entry for every change you check in. Make sure you
use standard ChangeLog format. Look in the current ChangeLog for
examples of this.

V   On CVS:

There shall be the following tags:
 atlas-cpp-x_y_z: Represents Atlas-C++ version x.y.z
   WARNING: Do not check out with one of these tags and then commit!
            Any versions tagged as this are to STAY EXACTLY THE SAME.
 atlas-cpp-stable: Represents the current "stable" branch of
  Atlas-C++, i.e. versions that being with x.y where y is even. If you
  are doing work on the stable Atlas-C++ version, make sure you check
  out with this tag only! Don't use a tag called atlas-cpp-x_y_z.
  Once an official release is made, it shall be tagged as
  atlas-cpp-x_y_z where x_y_z represents the version number. Then that
  tag shall not be touched, further development shall continue with
  the atlas-cpp-stable tag.
 HEAD: the default tag, indicates the unstable branch. The same holds
  as for atlas-cpp-stable. Once this becomes stable, do the following:
   - fetch atlas-cpp-stable. Tag it as atlas-cpp-x_y where x_y
     corresponds with major version x.y.
   - fetch HEAD. Tag it as atlas-stable.
   - Tag a release, if necessary.

VI  On review and ownership:

Stefanus du Toit and Michael Day are no longer directly incolved with the
WorldForge project on a day to day basis, so ownership and maintenance
of this code has been handed over to Al Riddoch.

Due to the importance of Atlas-C++ to the WorldForge project, changes are
strictly controlled. Please contact Al Riddoch on irc, where he is known
as alriddoch, via the WorldForge mailing lists, or via direct email
as alriddoch@zepler.org before starting any development, and before
commiting any changes. This does not affect your right to modify the code
as described in the LGPL (see COPYING).

VII On namespaces:

Each subdirectory should use its own namespace for classes it contains,
and package the object files in a library file associated with
this namespace. namespaces are hierarchical following the directory
hierarchy, and everything exists with the Atlas namespace.

From 0.5.x onwards, the "using namespace ..." directive should never be used
is it increases the likelyhood on namespace pollution, and slows down compile
times. Use is also discouraged in programs which use Atlas-C++, and 
in any C++ program. No additional use should be made of the
"using namespace ..." directive should be made in branch before 0.5.x, and
its use may be phased out in these branches eventually.

Written by Stefanus Du Toit <sjdutoit@uwaterloo.ca> on 2001-01-14.
Added to by Alistair Riddoch <alriddoch@zepler.org> on 2001-05-11.
Last updated by Alistair Riddoch <alriddoch@zepler.org> on 2001-05-11.