Actions
CodeStyle » History » Revision 1
Revision 1/30
| Next »
Junxiao Shi, 01/18/2014 09:56 PM
NFD code style guidelines¶
NFD adopts NDN Platform C++, C, C#, Java and JavaScript Code Guidelines, with the following exceptions:
- (amended 10). Global variables should have
g_
prefix - (amended 11). All class variables should have
m_
prefix. Static class variables should haves_
prefix. - (amended 33). We will use only
.cpp
and.hpp
extensions - (amended 44). Avoid C-style casts. Use
static_cast
,dynamic_cast
,reinterpret_cast
,const_cast
where appropriate instead. - (new). Exceptions can be used in the code, but should be used only in exceptional cases and not in the primary processing path.
- (new). When declaring/defining function/method, the return type should be put on a separate line before function/method name.
Updated by Junxiao Shi about 11 years ago · 28 revisions