diff options
Diffstat (limited to 'Build/source/libs/graphite-engine/doc/hungarian.txt')
-rw-r--r-- | Build/source/libs/graphite-engine/doc/hungarian.txt | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/Build/source/libs/graphite-engine/doc/hungarian.txt b/Build/source/libs/graphite-engine/doc/hungarian.txt new file mode 100644 index 00000000000..580fe19414b --- /dev/null +++ b/Build/source/libs/graphite-engine/doc/hungarian.txt @@ -0,0 +1,123 @@ +GRAPHITE HUNGARIAN NOTATION
+
+General rules for variable names:
+
+* Syntax is:
+ scope indicator (if any)
+ combining prefix (zero or more)
+ type/class indicator (required)
+ usage labels (optional)
+
+* The only places underscores are used are after the scoping prefixes. Uppercase is used to separate the prefixes from the main label, if any; eg: strName, m_psegNew.
+
+* If you are creating a new class, make up a short indicator for it and use it consistently. Class indicators should be 3-6 characters long.
+
+* An appropriate way to indicate method arguments where necessary is with an "Arg" usage label, eg: nValueArg. Generally method arguments have no special indication.
+
+* Usage labels can be made up arbitrarily, but the ones listed below should be used if they apply.
+
+
+*** Scope indicators:
+
+m_ member variable
+s_ static (global) variable
+
+
+*** Combining prefixes:
+
+i index
+c counter
+p pointer
+pp double pointer
+rg range (array, especially stack-allocated)
+prg pointer to the start of an array (often used for method arguments)
+v vector
+d delta or difference
+k constant (combines with an enumeration identifier: eg, klb, kest, kgmet, etc)
+
+
+*** Basic type indicators:
+
+f boolean (flag)
+n integer (simple numerical value--not a counter, index, glyph id, char, measurement, etc.)
+b byte
+l long integer (whatever that means)
+ch character (width irrelevant)
+chs short character (8-bit)
+chw wide character (16-bit)
+chl 32-bit character
+str string (char-width irrelevant)
+sta ANSI string (8-bit)
+stu Unicode string (16-bit)
+fxd fixed-field integer
+v void (yes, this duplicates vector)
+
+Graphite specific integer types:
+
+gid glyph id
+m em-units
+xs logical units, x-coordinates (source)
+ys logical units, y-coordinates (source)
+xys logical units, x- or y-coordinates (source)
+
+
+*** Common Graphite-specific class prefixes (not a complete list)
+
+seg Segment
+font Font
+txsrc TextSource
+fface FontFace
+pass GrPass
+greng GrEngine
+tman GrTableManager
+sstrm GrSlotStream
+slot GrSlotState
+slout GrSlotOutput
+chstrm GrCharStream
+gbb glyph bounding box
+
+
+*** Enumeration prefixes (see the GrConstants.h and GrData.h files for a more complete list)
+
+lb line break (breakweight)
+twsh trailing whitespace handling
+est end-segment type (why the segment was terminated)
+dm draw mode (for insertion points)
+dirc directionality code
+slat slot attribute name
+clr color
+op operator in Graphite's stack machine
+
+
+*** Usage labels (somewhat optional, depending on context)
+
+Min first in a sequence or array (used with Lim); minimum (used with Max)
+Lim 1 + last in a sequence or array
+Max maximum
+First first in a sequence (used with Last)
+Last last in a sequence
+Prev previous
+Next next
+Ret return value
+In input
+Out output
+New newly created object
+Arg method argument
+
+-----------------
+
+EXAMPLES
+
+pf pointer to boolean
+cch character count
+ipassPrev index of previous pass
+pppass pointer to a pointer to a pass
+iislot index to an index to a GrSlotState
+vichw vector of character indices
+prgchw pointer to the start of a wide-char buffer
+dislot delta to apply to an index of a GrSlotState
+m_ipass index of pass (member variable)
+ppassNew newly created pass
+clrBack background color
+m_igbbFirst index to the first glyph bounding box (member variable)
+islotLim 1 + index of the last slot
\ No newline at end of file |