LSL OSSL Standards

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(New page: POLICY PROPOSAL: This document is a proposal for naming standards and is not yet active. Base Syntax: osCategoryFunction() =Naming= Function should be clearly named & indicative of purp...)
 
m (Category Examples: removed a spam link)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 +
{{Quicklinks}}
 +
<br />
 +
 
POLICY PROPOSAL:
 
POLICY PROPOSAL:
 
This document is a proposal for naming standards and is not yet active.
 
This document is a proposal for naming standards and is not yet active.
Line 5: Line 9:
 
Base Syntax: osCategoryFunction()
 
Base Syntax: osCategoryFunction()
  
=Naming=
+
= Naming =
 
Function should be clearly named & indicative of purpose, eg:
 
Function should be clearly named & indicative of purpose, eg:
  
Line 12: Line 16:
 
osRegionAnnouncement - Better
 
osRegionAnnouncement - Better
  
==Get/Set Functions==
+
== 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'.
 
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'.
  
Line 29: Line 33:
 
etc.
 
etc.
  
==Category Examples==
+
== Category Examples ==
  
 
* Region - region admin and region-wide scoped functions.
 
* Region - region admin and region-wide scoped functions.
Line 43: Line 47:
 
** osSetShapePattern()
 
** osSetShapePattern()
 
** osSetShapeColour()
 
** osSetShapeColour()
 
 
etc.
 
etc.
 +
 +
[[Category:Development]]

Latest revision as of 11:20, 7 September 2020


POLICY PROPOSAL: This document is a proposal for naming standards and is not yet active.


Base Syntax: osCategoryFunction()

[edit] Naming

Function should be clearly named & indicative of purpose, eg:

osSendAnnounce - Mediocre osRegionAnnounce - Good osRegionAnnouncement - Better

[edit] 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.

[edit] 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.

Personal tools
General
About This Wiki