Naming Conventions

From K-3D

Jump to: navigation, search

Overview

All written documentation must refer to "K-3D" ... "K3D", "k-3d", "k3d", "k-3D", etc. are all wrong.

Source Code Naming

Category Description Examples
Plugin Names Use camel case names without whitespace. "BlendPoints", "RenderManDice", "GLFrappe"
Property Names Use lower case names with underscores. "x_distance", "diffuse_color", "scale"
Property Labels Use capitalized words with normal whitespace. "X Distance", "Diffuse Color", "Scale"
Property Descriptions Use a single sentence, correctly capitalized, using correct punctuation, to describe the property. "Controls the surface diffuse color."
Namespaces Use lower case names with underscores. Use a "detail" sub-namespace to hide implementation details. Do not use the anonymous namespace - it causes problems during dynamic linking! "k3d", "k3d::detail"
Module Namespaces Each plugin module's symbols should be in a namespace nested within the "module" namespace. Namespaces may be nested arbitrarily deep, such as "module::opengl" for the module providing general OpenGL integration plugins, and "module::opengl::painters" for the module providing OpenGL mesh painter plugins. Do not use the anonymous namespace within a plugin module - it causes problems during dynamic linking! "module::pixie", "module::vtk", "module::ngui::pipeline_profiler"
Class Names Use lower case names with underscores "color", "mind_reader", "email_client_implementation"
Menu Items Use capitalized words with normal whitespace. "New", "Open File", "Choose Render Engine"
Personal tools