Blame HACKING

rpm-build 1d6469
librevenge coding style
rpm-build 1d6469
-----------------------
rpm-build 1d6469
rpm-build 1d6469
Indentation/spacing: We indent with tabs. Not spaces. This decision is, of
rpm-build 1d6469
course, rather contentious, but it does have the force of inertia going for
rpm-build 1d6469
it. Try to keep lines less than 120 columns wide. Please run
rpm-build 1d6469
rpm-build 1d6469
    astyle --options=astyle.options \*.h \*.cpp
rpm-build 1d6469
rpm-build 1d6469
before committing.
rpm-build 1d6469
rpm-build 1d6469
API: By agreement, public API does use neither C++ standard library nor Boost.
rpm-build 1d6469
If a function takes or returns a dynamically allocated data buffer, it must be
rpm-build 1d6469
documented who is responsible for freeing the memory.
rpm-build 1d6469
rpm-build 1d6469
Naming: All public classes, enumerations, and defines should be prefixed with
rpm-build 1d6469
RVNG.
rpm-build 1d6469
rpm-build 1d6469
For better worse, we have decided on using the camel caps convention for naming 
rpm-build 1d6469
variables (i.e.: tempJustification). Use of hungarian notation (i.e.: iNum) is
rpm-build 1d6469
forbidden, with one exception: use the 'm_' prefix for naming class and struct
rpm-build 1d6469
variables (i.e.: my_class->m_var). Short-hand for variable names is allowed,
rpm-build 1d6469
but don't overdo it (m_var->len() instead of m_variable->length() is ok,
rpm-build 1d6469
m_nam instead of m_name is stupid).
rpm-build 1d6469
rpm-build 1d6469
Memory allocation: Use the C++ standard operations for this (new, delete). 
rpm-build 1d6469
Use of smart pointers, e.g., boost::shared_ptr and boost::scoped_ptr, is
rpm-build 1d6469
strongly encouraged. The only exeption to that is public API, where only plain
rpm-build 1d6469
pointers are allowed.
rpm-build 1d6469
rpm-build 1d6469
Data structures: Use the C++ standard library wherever appropriate and 
rpm-build 1d6469
convenient. It should almost never be necessary to roll your own data 
rpm-build 1d6469
structure.
rpm-build 1d6469
rpm-build 1d6469
Strings: You may use either the C++ standard strings or our very own 
rpm-build 1d6469
UTF8-compliant RVNGString. Hand-allocated char *'s are discouraged.
rpm-build 1d6469
rpm-build 1d6469
Further information: The OpenOffice.org (http://tools.openoffice.org/coding.html)
rpm-build 1d6469
and AbiWord (cvs://cvs.abisource.com/abi/docs/AbiSourceCodeGuidelines.abw) 
rpm-build 1d6469
contain lots of useful information that will make you a better C++ coder. 
rpm-build 1d6469
Follow their advice religiously, except when they contradict something in this 
rpm-build 1d6469
document.
rpm-build 1d6469
rpm-build 1d6469
Fun: Remember, the important thing is to have fun. :-) These rules are a means,
rpm-build 1d6469
not an end. Happy hacking!