• Main Page
  • Namespaces
  • Classes
  • Files

PhysicalSchemaMapping.h

Go to the documentation of this file.
00001 //
00002 // Copyright (C) 2007 Refractions Research, 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 FDOPOSTGIS_PHYSICALSCHEMAMAPPING_H_INCLUDED
00018 #define FDOPOSTGIS_PHYSICALSCHEMAMAPPING_H_INCLUDED
00019 
00020 #include <PostGIS/Override/ClassCollection.h>
00021 
00022 namespace fdo { namespace postgis { namespace ov {
00023 
00024 // Forward declarations
00025 class ClassDefinition;
00026 class ClassCollection;
00027     
00028 /// \todo To be documented
00029 class PhysicalSchemaMapping : public FdoPhysicalSchemaMapping
00030 {
00031 public:
00032 
00033     typedef FdoPtr<PhysicalSchemaMapping> Ptr;
00034 
00035     //
00036     // FdoPhysicalClassMapping interface
00037     //
00038     
00039     FDOPOSTGIS_API static PhysicalSchemaMapping* Create();
00040 
00041     FDOPOSTGIS_API virtual FdoString* GetProvider();
00042     
00043     FDOPOSTGIS_API ClassCollection* GetClasses() const; 
00044 
00045     /// Find a feature class by name
00046     FDOPOSTGIS_API ClassDefinition* FindByClassName(FdoStringP const& name);
00047 
00048     //
00049     // FdoPhysicalElementMapping interface
00050     //
00051 
00052     /// Initializes this class from its XML attributes.
00053     FDOPOSTGIS_API virtual void InitFromXml(FdoXmlSaxContext* xmlContext,
00054         FdoXmlAttributeCollection* xmlAttrs);
00055 
00056     /// Writes this class to XML.
00057     FDOPOSTGIS_API virtual void _writeXml(FdoXmlWriter* xmlWriter,
00058         FdoXmlFlags const* xmlFlags);
00059 
00060     //
00061     // FdoXmlSaxHandler interface
00062     //
00063 
00064     /// SAX callback called when the FdoXmlReader reads the start tag for
00065     /// an XML element in the document.
00066     FDOPOSTGIS_API virtual FdoXmlSaxHandler* XmlStartElement(FdoXmlSaxContext *saxContext,
00067         FdoString* uri, FdoString* name, FdoString* qname,
00068         FdoXmlAttributeCollection* xmlAtts);
00069 
00070     /// SAX callback called when the FdoXmlReader reads the end tag for
00071     /// an XML element in the document. 
00072     FDOPOSTGIS_API virtual FdoBoolean XmlEndElement(FdoXmlSaxContext* saxContext,
00073         FdoString* uri, FdoString* name, FdoString* qname);
00074 
00075 protected:
00076 
00077     PhysicalSchemaMapping();
00078     virtual ~PhysicalSchemaMapping();
00079 
00080     //
00081     // FdoIDisposable interface
00082     //
00083 
00084     virtual void Dispose();
00085 
00086 private:
00087 
00088     ClassCollection::Ptr mClasses;
00089 
00090     typedef FdoPhysicalSchemaMapping BaseType;
00091 };
00092 
00093 }}} // namespace fdo::postgis::ov
00094 
00095 #endif // FDOPOSTGIS_PHYSICALSCHEMAMAPPING_H_INCLUDED
Please send us your comment about this page