OSSL Standards
From OpenSimulator
m |
|||
Line 54: | Line 54: | ||
= See Also = | = See Also = | ||
* [[LSL Status|LSL/OSSL Status Page]] | * [[LSL Status|LSL/OSSL Status Page]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* OSSL | * OSSL | ||
** [[OSSL Status/Types |OSSL Types Status Page]] | ** [[OSSL Status/Types |OSSL Types Status Page]] | ||
Line 67: | Line 60: | ||
** [[OSSL_Implemented | OSSL Implemented Functions]] | ** [[OSSL_Implemented | OSSL Implemented Functions]] | ||
** [[OSSL_Standards | OSSL Standards]] | ** [[OSSL_Standards | OSSL Standards]] | ||
− | |||
[[Category:Development]] | [[Category:Development]] | ||
[[Category:OSSL]] | [[Category:OSSL]] |
Revision as of 01:21, 4 June 2011
POLICY PROPOSAL: This document is a proposal for naming standards and is not yet active.
Base Syntax: osCategoryFunction()
Naming
Function and parameter names should use US English spelling.
Function should be clearly named & indicative of purpose, eg:
osSendAnnounce - Mediocre
osRegionAnnounce - Good
osRegionAnnouncement - Better
Get/Set Functions
Get/Set functions should be clearly named & use a common syntax for both Get and Set. In Get/Set examples, Get/Set are the first letters after 'os'.
Eg, llSetOffsetTexture and llTextureOffset are particularly good examples of how not to do it.
The Os() equivilent if they were to be created again should be something along the lines of
osGetTextureOffset()
osSetTextureOffset()
This could be complemented with:
osGetTextureURL()
osSetTextureURL()
etc.
Category Examples
- Region - region admin and region-wide scoped functions.
- osRegionAnnouncement()
- osRegionRestart()
- Permission - answers yes/no boolean questions as to whether the owner of the primitive, or the primitive has permission to do something.
- osGetPermissionEditLand()
- Texture - anything to do with textures on the primitive
- osGetTextureURL()
- osSetTextureText()
- Shape - anything to do with the primitives shape
- osSetShapePath()
- osSetShapePattern()
- osSetShapeColour()
etc.