diff options
| author | Frank Warmerdam <warmerdam@pobox.com> | 2005-10-19 03:18:15 +0000 |
|---|---|---|
| committer | Frank Warmerdam <warmerdam@pobox.com> | 2005-10-19 03:18:15 +0000 |
| commit | 65dc2802ca18f4ddba2bca00997eaf6084eb7cc1 (patch) | |
| tree | 3330b759ac3678a7a9987a9e96e0568d55551d53 /com/ProjDef.h | |
| parent | 7b6b0968e40f03f2a701d54da09494757f640614 (diff) | |
| download | PROJ-65dc2802ca18f4ddba2bca00997eaf6084eb7cc1.tar.gz PROJ-65dc2802ca18f4ddba2bca00997eaf6084eb7cc1.zip | |
New
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1308 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'com/ProjDef.h')
| -rwxr-xr-x | com/ProjDef.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/com/ProjDef.h b/com/ProjDef.h new file mode 100755 index 00000000..017bf48f --- /dev/null +++ b/com/ProjDef.h @@ -0,0 +1,49 @@ +// ProjDef.h : Declaration of the CProjDef + +#ifndef __PROJDEF_H_ +#define __PROJDEF_H_ + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CProjDef +class ATL_NO_VTABLE CProjDef : + public CComObjectRootEx<CComMultiThreadModel>, + public CComCoClass<CProjDef, &CLSID_ProjDef>, + public IDispatchImpl<IProjDef, &IID_IProjDef, &LIBID_PROJ4Lib> +{ +public: + CProjDef() + { + psProj = NULL; + sLastError = NULL; + SetError(""); + } + +DECLARE_REGISTRY_RESOURCEID(IDR_PROJDEF) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CProjDef) + COM_INTERFACE_ENTRY(IProjDef) + COM_INTERFACE_ENTRY(IDispatch) +END_COM_MAP() + +// IProjDef +public: + STDMETHOD(GetLastError)( BSTR *error ); + STDMETHOD(IsLatLong)(/*[out]*/ int *result); + STDMETHOD(GetHandle)(long *pHandle); + STDMETHOD(TransformPoint3D)(IUnknown *srcProj, double *x, double *y, double *z, int *success); + STDMETHOD(Initialize)(BSTR proj_string, int *success); + +private: + void SetError( const char *pszMessage ); + void SetProjError( const char *pszMessage ); + + BSTR sLastError; + void *psProj; + +}; + +#endif //__PROJDEF_H_ |
