[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DLM returning a pointer...




PS- 
The object is another layer of abstraction, but it needn't be difficult.
IDL code might look something like this, ignoring argument checking,
error checking, etc.  You can do that either on this level or on the
level of the C wrapper routines.


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; File: DBinterface__define.pro

FUNCTION DBinterface::init

	self.struct_ptr = DBconnect_wrap
	RETURN, 1

END ;init

;-----------
PRO DBinterface::cleanup

	error = DBclose_wrap(self.struct_ptr)
	self.struct_ptr = 0ULL

END ;cleanup

;-----------
FUNCTION DBinterface::DBexecute, query	

	RETURN, DBexec_wrap(self.struct_ptr, query)
	
END

;-----------
FUNCTION DBinterface::DBgetval, index

	RETURN, DBgetv_wrap(self.struct_ptr, index)

END

;-----------
PRO DBinterface__define

	void = { $
		struct_ptr	:	0ULL		$
		}	

END ;DBinterface__define
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Cheers,
Rich
 
-- 
Richard Younger                         
Assistant Technical Staff               MIT Lincoln Laboratory
Electro-Optical Materials and Devices   Mail Stop C-130
Email: younger@ll.mit.spmdecoy.edu      244 Wood St.
Phone: (781)981-4464                    Lexington, MA 02144-9108