Strict Standards: Declaration of action_plugin_importoldchangelog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /nfsmnt/hosting1_2/8/2/82f54cb0-e474-4da4-9cdc-40dcd737e16b/mypage.sk/sub/tery/dokuwiki/lib/plugins/importoldchangelog/action.php on line 8

Strict Standards: Declaration of action_plugin_safefnrecode::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /nfsmnt/hosting1_2/8/2/82f54cb0-e474-4da4-9cdc-40dcd737e16b/mypage.sk/sub/tery/dokuwiki/lib/plugins/safefnrecode/action.php on line 0

Strict Standards: Declaration of action_plugin_popularity::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /nfsmnt/hosting1_2/8/2/82f54cb0-e474-4da4-9cdc-40dcd737e16b/mypage.sk/sub/tery/dokuwiki/lib/plugins/popularity/action.php on line 0

Strict Standards: Declaration of Doku_Renderer_metadata::table_open() should be compatible with Doku_Renderer::table_open($maxcols = NULL, $numrows = NULL, $pos = NULL) in /nfsmnt/hosting1_2/8/2/82f54cb0-e474-4da4-9cdc-40dcd737e16b/mypage.sk/sub/tery/dokuwiki/inc/parser/metadata.php on line 24

Strict Standards: Declaration of Doku_Renderer_metadata::table_close() should be compatible with Doku_Renderer::table_close($pos = NULL) in /nfsmnt/hosting1_2/8/2/82f54cb0-e474-4da4-9cdc-40dcd737e16b/mypage.sk/sub/tery/dokuwiki/inc/parser/metadata.php on line 24
tery:coding_rules [TeryWiki]
 

Coding rules

* if you work with filenames or you search directories for paths then use relative paths instead of full-paths ( ”../data/file.dat” instead of “c:\myproject\data\file.dat” )

* name the source files in lower-case and also write filenames into #include in lower-case. Unix and some other operating systems are case-sensitive, and they would have problems finding the includes. This applies to Tery - project files. It does not apply to used 3rd party libraries, as we can't change their filenames.

* enumerates type names should be prefected with “e_” >

enum	e_MyEnum {}

* constants, definitions, macros and typedefs should be uppercase with “_” >

#define		MY_MACRO_FOR_SOMETHING

* all member variables should be prefected with “m_” >

private:	int	m_Iterator;

* all member variables, which are pointers to complex data types should be prefected with “m_p” >

private:	CComlexClass	m_pPointerToComplex;

* automatic variables should be short and lowercase >

i,j,k, etc.  buf,in,out,iterator etc. atd

* if it is possible Pascal style of functions should be used (also with braces) >

void MyFuncionForSomething( void ) {	// some code  }

* if some class is thread safe it should be visibly mentioned

* “ToDo:” comments should be at the begining of the line

* The same with commented blocks of code

* in cases of more complicated nested ifs and whiles etc. should be short comment at the end of each blocks (it depends on certain situation) >

if( TRUE )
{
	if( TRUE )
	{
		while( TRUE )
		{
		} // end while
	} // end if
} // end if

* unambiguously differentiate between private methods for internall use and provided public interface methods by well arranged organisation inside of header file

tery/coding_rules.txt · Last modified: 2007/03/14 16:22 by siiilon
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki