OSGeo FDO Provider for SHP API Reference

OSGeo FDO Provider for SHP API

API Reference OSGeo FDO Provider for SHP

FdoShpPhysicalSchemaMapping.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2006  Autodesk, Inc.
00003 * 
00004 * This library is free software; you can redistribute it and/or
00005 * modify it under the terms of version 2.1 of the GNU Lesser
00006 * General Public License as published by the Free Software Foundation.
00007 * 
00008 * This library is distributed in the hope that it will be useful,
00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 * Lesser General Public License for more details.
00012 * 
00013 * You should have received a copy of the GNU Lesser General Public
00014 * License along with this library; if not, write to the Free Software
00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00016  */
00017 #ifndef FDOSHPPHYSICALSCHEMAMAPPING_H
00018 #define FDOSHPPHYSICALSCHEMAMAPPING_H
00019 
00020 #ifdef _WIN32
00021 #pragma once
00022 #endif //_WIN32
00023 
00024 #include <SHP/Override/FdoShpClassCollection.h>
00025 
00026 class FdoShpOvPhysicalSchemaMapping : public FdoPhysicalSchemaMapping
00027 {
00028     typedef FdoPhysicalSchemaMapping BaseType;
00029 
00030 public:
00031     FDOSHP_API static FdoShpOvPhysicalSchemaMapping* Create();
00032 
00033     FDOSHP_API virtual FdoString* GetProvider();
00034     FDOSHP_API FdoShpOvClassCollection* GetClasses() const; 
00035 
00036     FDOSHP_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
00037     FDOSHP_API virtual FdoXmlSaxHandler* XmlStartElement(FdoXmlSaxContext* context,FdoString* uri, FdoString* name, FdoString* qname, FdoXmlAttributeCollection* atts);
00038     FDOSHP_API virtual FdoBoolean XmlEndElement(FdoXmlSaxContext* context, FdoString* uri, FdoString* name, FdoString* qname);
00039     FDOSHP_API virtual void _writeXml(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags);
00040 
00041     /// Helper method to find a class mapping that maps to a given shapefile:
00042     FDOSHP_API FdoShpOvClassDefinition* FindByShapefile(FdoString *shapefilePath);
00043 
00044     /// Helper method to find a class mapping that maps to a given classname:
00045     FDOSHP_API FdoShpOvClassDefinition* FindByClassName(FdoString *class_name);
00046 
00047 protected:
00048     FdoShpOvPhysicalSchemaMapping(void);
00049     virtual ~FdoShpOvPhysicalSchemaMapping(void);
00050     virtual void Dispose(void);
00051 
00052 private:
00053     FdoShpOvClassCollectionP m_Classes;
00054 };
00055 
00056 /// \ingroup (typedefs)
00057 /// \brief
00058 /// FdoShpOvPhysicalSchemaMappingP is an FdoPtr on FdoShpOvPhysicalSchemaMapping
00059 /// provided for convenience.
00060 typedef FdoPtr<FdoShpOvPhysicalSchemaMapping> FdoShpOvPhysicalSchemaMappingP;
00061 
00062 #endif // FDOSHPPHYSICALSCHEMAMAPPING_H
00063 
00064 

Comments?