home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 10 / AU_CD10.iso / Updates / Perl / Non-RPC / Docs / RISCOS-Library-Docs / AOF.pm < prev    next >
Text File  |  1999-04-17  |  3KB  |  98 lines

  1. NAME
  2.     RISCOS::AOF -- manipulate ARM Object Format files
  3.  
  4. SYNOPSIS
  5.         use RISCOS::AOF;
  6.  
  7.         my $obj_file = new RISCOS::AOF $file;
  8.         foreach my $symbol (@{$obj_file->Symbols}) {
  9.         print $symbol->Name(), "\n" if $symbol->Scope eq 'extern';
  10.         }
  11.  
  12.  
  13. DESCRIPTION
  14.     `RISCOS::AOF' provides a class derived from `RISCOS::Chunkfile'
  15.     to manipulate the contents of ARM Oject Format files. It
  16.     provides a class `RISCOS::AOF::Symbol' to store details of each
  17.     symbol in an `AOF' file.
  18.  
  19.     Currently the implementation is incomplete - only methods to
  20.     manipulate the symbol table have been written. Methods to
  21.     manipulate area data are currently unimplemented.
  22.  
  23.   Methods
  24.  
  25.     new <array_ref>
  26.  
  27.     new <file>
  28.         If passed a reference to an array it is assumed to be an
  29.         array of `RISCOS::Chunk' objects to use as the file
  30.         contents. Otherwise calls `RISCOS::File::load' to loads the
  31.         file specified using and checks that it is `AOF'. Hence
  32.         *file* can be a filename, a reference to a filehandle, or a
  33.         reference to a scalar which is used as the file's contents.
  34.  
  35.         If passed an array reference then this is used internally in
  36.         the object, so should be created with the anonymous array
  37.         constructor `[]' rather than a reference to a named array
  38.         variable (see the "Common Mistakes" entry in the perldsc
  39.         manpage).
  40.  
  41.         Returns undefined if there was an error, or the file
  42.         contents are corrupt.
  43.  
  44.     String <offset> [...]
  45.         Looks up strings in the stringtable.
  46.  
  47.         In scalar context returns the string at the first offset
  48.         given. In array context returns the list of strings referred
  49.         to by the supplied list of offsets.
  50.  
  51.     Creator
  52.         Returns whatever string is stored in the `OBJ_IDFN' chunk -
  53.         typically a string identifying the creator of the `AOF'
  54.         file.
  55.  
  56.     Version
  57.         Returns the version number from the `AOF' file.
  58.  
  59.     Symbols
  60.         Returns a reference to the array of `RISCOS::AOF::Symbol'
  61.         objects describing the symbols in the `AOF' file.
  62.  
  63.  
  64. RISCOS::AOF::Symbol
  65.     The `RISCOS::AOF::Symbol' class is used to hold information
  66.     about a symbol in an `AOF' file. The class provides the
  67.     following methods to access this information:
  68.  
  69.     Name
  70.         Returns the symbol name.
  71.  
  72.     Value
  73.         Returns the symbol value. If the symbol is absolute then
  74.         this is just a number. Otherwise it is a string of the form
  75.         "`*value* relative to area '*area*''".
  76.  
  77.     Defined
  78.         Returns true if the symbol is defined in this `AOF' file.
  79.         Returns false if it is defined externally.
  80.  
  81.     Scope
  82.         Returns the scope of the symbol ('`static'', '`extern'' or
  83.         '').
  84.  
  85.     Misc
  86.         Returns an array of strings describing other properties of
  87.         the symbol - *e.g.* '`case insensitive'', '`weak'',
  88.         '`strong'', '`common area''.
  89.  
  90.  
  91. BUGS
  92.     As noted, methods to manipulate areas are currently
  93.     unimplemented.
  94.  
  95. AUTHOR
  96.     Nicholas Clark <nick@unfortu.net>
  97.  
  98.