Coding Guidelines

Please read the following sections carefully before committing new code to the repository. More...

Please read the following sections carefully before committing new code to the repository.

Conventions

Style

New code should follow this example:

namespace nuklei {
class RegionOfInterest
{
public:
RegionOfInterest(bool positive = true) :
positive_(positive) {}
virtual ~RegionOfInterest() {}
bool contains(const Vector3 &v) const
{
return (positive_ == contains_(v)) || (next_ && next_->contains(v));
}
protected:
virtual bool contains_(const Vector3 &v) const = 0;
bool positive_;
private:
boost::shared_ptr<RegionOfInterest> next_;
};
}

In particular:

Writing Good C++

C++ provides the programmer with a lot of freedom, which brings flexibility, but also danger :-)

The c++-faq draws attention to many subtle issues that can arise in C++.

Public namespace.
Definition: Color.cpp:9
© Copyright 2007-2013 Renaud Detry.
Distributed under the terms of the GNU General Public License (GPL).
(See accompanying file LICENSE.txt or copy at http://www.gnu.org/copyleft/gpl.html.)
Revised Sun Sep 13 2020 19:10:07.