objects.README 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. objects.txt syntax
  2. ------------------
  3. To cover all the naming hacks that were previously in objects.h needed some
  4. kind of hacks in objects.txt.
  5. The basic syntax for adding an object is as follows:
  6. 1 2 3 4 : shortName : Long Name
  7. If the long name doesn't contain spaces, or no short name
  8. exists, the long name is used as basis for the base name
  9. in C. Otherwise, the short name is used.
  10. The base name (let's call it 'base') will then be used to
  11. create the C macros SN_base, LN_base, NID_base and OBJ_base.
  12. Note that if the base name contains spaces, dashes or periods,
  13. those will be converte to underscore.
  14. Then there are some extra commands:
  15. !Alias foo 1 2 3 4
  16. This juts makes a name foo for an OID. The C macro
  17. OBJ_foo will be created as a result.
  18. !Cname foo
  19. This makes sure that the name foo will be used as base name
  20. in C.
  21. !module foo
  22. 1 2 3 4 : shortName : Long Name
  23. !global
  24. The !module command was meant to define a kind of modularity.
  25. What it does is to make sure the module name is prepended
  26. to the base name. !global turns this off. This construction
  27. is not recursive.
  28. Lines starting with # are treated as comments, as well as any line starting
  29. with ! and not matching the commands above.