cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync/* $Id$ */
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync/** @file
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * VirtualBox Validation Kit - Coding Guidelines.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync */
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync/*
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Copyright (C) 2010-2014 Oracle Corporation
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * available from http://www.virtualbox.org. This file is free software;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * you can redistribute it and/or modify it under the terms of the GNU
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * General Public License (GPL) as published by the Free Software
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * The contents of this file may alternatively be used under the terms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * of the Common Development and Distribution License Version 1.0
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * VirtualBox OSE distribution, in which case the provisions of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * CDDL are applicable instead of those of the GPL.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * You may elect to license modified versions of this file under the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * terms and conditions of either the GPL or the CDDL or both.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync */
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync/** @page pg_validationkit_guideline Validation Kit Coding Guidelines
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * The guidelines extends the VBox coding guidelines (@ref pg_vbox_guideline)
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * and currently only defines python prefixes and linting.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * @section sec_validationkit_guideline_python Python
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Python is a typeless language so using prefixes to indicate the intended
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * type of a variable or attribute can be very helpful.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Type prefixes:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'b' for byte (octect).
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'ch' for a single character.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'f' for boolean and flags.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'fn' for function or method references.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'fp' for floating point values.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'i' for integers.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'l' for long integers.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'o' for objects, structures and anything with attributes that doesn't
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * match any of the other type prefixes.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'r' for a range or xrange.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 's' for a string (can be unicode).
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'su' for a unicode string when the distinction is important.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Collection qualifiers:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'a' for a list or an array.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'd' for a dictionary.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'h' for a hash.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 't' for a tuple.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Other qualifiers:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'c' for a count. Implies integer or long integer type. Higest
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * priority.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'sec' for a second value. Implies long integer type.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'ms' for a millisecond value. Implies long integer type.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'us' for a microsecond value. Implies long integer type.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * - 'ns' for a nanosecond value. Implies long integer type.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * The 'ms', 'us', 'ns' and 'se' qualifiers can be capitalized when prefixed by
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * 'c', e.g. cMsElapsed. While this technically means they are no longer a
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * prefix, it's easier to read and everyone understands what it means.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * The type collection qualifiers comes first, then the other qualifiers and
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * finally the type qualifier.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync *
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync */
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync