3 CodingStyle - standards while programming for LilyPond
7 Please use these standards while doing programming for LilyPond
9 Functions and methods do not return errorcodes, but use assert for
17 (add-hook 'c-mode-hook
18 '(lambda ()(setq c-basic-offset 4)))
21 (add-hook 'c++-mode-hook
22 '(lambda() (c-set-style "Stroustrup")
27 =head2 CLASSES and TYPES:
30 AClass_name (for Abbreviation_class_name)
35 Type Class::member_type_
37 the C<type> is a Hungarian notation postfix for $C<Type>$.
42 The source is commented in the DOC++ style. Check out doc++ at
43 http://www.zib.de/Visual/software/doc++/index.html
65 Unfortunately most of the code isn't really documented that good.
70 A lot of classes in LilyPond start with 'P', this is to distinguish
71 certain parts of LilyPond: the P stands for Printer, and the P-classes
72 are supposed to be more lowlevel than the others. Example:
74 Staff uses PStaff, PScore and PCol to do the typesetting of
75 symbols. Staff is the "brains" for PStaff
77 NB: in PCursor (which is part of the library) P stands for PointerCursor
84 ///check that *this satisfies its invariants, abort if not.
87 /// print *this (and substructures) to debugging log
90 /// add some data to *this;
93 Presence of these methods usually imply that it is not feasible to this
97 /// replace some data of *this