OSGeo FDO Provider for SHP API Reference

OSGeo FDO Provider for SHP API

API Reference OSGeo FDO Provider for SHP

FdoShpClassDefinition.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 FDOSHPCLASSDEFINITION_H
00018 #define FDOSHPCLASSDEFINITION_H
00019 
00020 #ifdef _WIN32
00021 #pragma once
00022 #endif //_WIN32
00023 
00024 #include <SHP/Override/FdoShpPropertyDefinitionCollection.h>
00025 
00026 class FdoShpOvClassDefinition : public FdoPhysicalClassMapping
00027 {
00028     typedef FdoPhysicalClassMapping BaseType;
00029 
00030 public:
00031     FDOSHP_API static FdoShpOvClassDefinition* Create();
00032 
00033 public:
00034     FDOSHP_API FdoShpOvPropertyDefinitionCollection* GetProperties() const;
00035     
00036     FDOSHP_API FdoString* GetShapeFile() const;
00037     FDOSHP_API void SetShapeFile(FdoString * location);
00038     bool IsPathUpdated(){ return m_pathUpdated; }
00039     void SetPathUpdated(bool lPathUpdated = true){ m_pathUpdated = lPathUpdated; }
00040 
00041     FDOSHP_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs);
00042     FDOSHP_API virtual FdoXmlSaxHandler* XmlStartElement(FdoXmlSaxContext* context,FdoString* uri, FdoString* name, FdoString* qname, FdoXmlAttributeCollection* atts);
00043     FDOSHP_API virtual FdoBoolean XmlEndElement(FdoXmlSaxContext* context, FdoString* uri, FdoString* name, FdoString* qname);
00044     FDOSHP_API virtual void _writeXml(FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags);
00045 
00046     /// Helper method to find a property mapping by its column name:
00047     FDOSHP_API FdoShpOvPropertyDefinition* FindByColumnName(FdoString* columnName);
00048 
00049 protected:
00050     FdoShpOvClassDefinition(void);
00051     virtual ~FdoShpOvClassDefinition(void);
00052     virtual void Dispose(void);
00053 
00054 private:
00055     bool m_pathUpdated;
00056     FdoStringP m_ShapeFileLocation;
00057     FdoShpOvPropertyDefinitionCollectionP m_Properties;
00058 };
00059 
00060 /// \ingroup (typedefs)
00061 /// \brief
00062 /// FdoShpOvClassDefinitionP is an FdoPtr on FdoShpOvClassDefinition
00063 /// provided for convenience.
00064 typedef FdoPtr<FdoShpOvClassDefinition> FdoShpOvClassDefinitionP;
00065 
00066 #endif // FDOSHPCLASSDEFINITION_H
00067 
00068 

Comments?