swig/Source/DOH
Dave Beazley fcbb0f7e38 Fixed file/line attributes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@94 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-01-14 03:48:02 +00:00
..
Doh Fixed file/line attributes 2000-01-14 03:48:02 +00:00
Include Fixed file/line attributes 2000-01-14 03:48:02 +00:00
.cvsignore Moved Makefiles and configure.in to the top level, and added .cvsignore 2000-01-11 20:51:24 +00:00
configure.in Cleanup 1999-08-12 05:21:29 +00:00
install-sh *** empty log message *** 1999-08-18 04:12:59 +00:00
Makefile.in Cleanup 1999-08-12 05:21:29 +00:00
README Fixed file/line attributes 2000-01-14 03:48:02 +00:00

DOH  (Dave's Object Hack)

Overview:
---------
DOH is a small C library that provides a number of simple yet powerful
data structures for building flexible applications.  The data
structures are built around a dynamic typing model in which any given
object is allowed to support one or more classes of operations.

Common Operations (for all types)
---------------------------------
Delete(obj)             Decrease the reference count and destroy if zero
Copy(obj)               Make a copy of an object.
Clear(obj)              Clear an object.
Str(obj)                Create a string representation of obj.
Data(obj)               Return pointer to raw data in an object
Len(obj)                Length of an object
Hash(obj)               Hash value (used for mapping)
Cmp(obj1,obj2)          Compare two objects.
Name(obj)               Return the object name
First(obj)              Return first object (iterator)
Next(obj)               Return next object

Mapping Operations (for hash table behavior)
--------------------------------------------
Getattr(hash,key)              Get an attribute
Setattr(hash,key,value)        Set an attribute
Delattr(hash,key)              Delete an attribute
Firstkey(hash,key)             Get first key
Nextkey(hash,key)              Get next key

Sequence Operations
-------------------
Getitem(list,index)             Get an item
Setitem(list,index,val)         Set an item
Delitem(list,index,val)         Delete an item
Insert(list,index,val)          Insert an item
Append(list,val)                Append to end

File Operations
---------------
Read(obj,buffer,len)            Read data
Write(obj,buffer,len)           Write data
Getc(obj)                       Get a character
Putc(ch,obj)                    Put a character
Ungetc(ch,obj)                  Put character back on input stream
Seek(obj,offset,whence)         Seek
Tell(obj)                       Return file pointer
Printf(obj,format,...)          Printf
Close(obj)                      Close