LISPOBJECT is C++ interface (not COM) that allows for software written in other compiling languages (Ñ++, Delphi etc.) to get access to lisp objects (lists or atoms). Also third-party software can create lisp object using CreateLispObject method.
All objects are divided into two classes:
• atoms (identifiers, strings, numbers)
• lists (lists of atoms and lists).
Using interface methods object type can be defined. There are several types:
• objATOM – atom itself. Its name can be obtained using objName method. Some value can be bounded with atom – it can be obtained using objGetItem method with zero index parameter.
• objLIST – list. It doesn’t contain name. Its elements can be obtained using objGetItem, passing element index.
• ObjÑNUMBER – number. Its name is string representation of number. Doesn’t contain subelements.
• ObjÑSTRING – zero-terminating string. Its name is string itself.
When working with lisp objects from other languages you should remember that lisp objects can not be deleted by lisp garbage collector, while object is managed from external program. Do forget to count references to objects.
LISPOBJECT interface is:
struct LISPOBJECT
{
virtual const char* _stdcall objName() = 0;
virtual const char* _stdcall objSetName(const char* newName) = 0;
virtual DWORD _stdcall objGetCount() = 0;
virtual LISPOBJECT* _stdcall objGetItem(DWORD index) = 0;
virtual DWORD _stdcall objAdd(DWORD simplifiedType,
const char* szValue) = 0;
virtual DWORD _stdcall objAddComplex(LISPOBJECT* object) = 0;
virtual void _stdcall objRemove(DWORD index) = 0;
virtual DWORD _stdcall objReadType() = 0;
virtual ULONG _stdcall AddRef() = 0;
virtual ULONG _stdcall Release() = 0;
};