Mercurial > postarc > postarc
diff Postarc/Postarc/PostArcClassDescription.cs @ 0:1aca3d413885 tip
Initial import of Postarc
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Fri, 05 Oct 2012 23:55:06 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Postarc/Postarc/PostArcClassDescription.cs Fri Oct 05 23:55:06 2012 +0200 @@ -0,0 +1,111 @@ +/* + * Postarc + * + * Author: + * Christian Lins <christian.lins@intevation.de> + * + * Copyright: + * Copyright (C) 2012 Intevation GmbH <http://www.intevation.de/> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ESRI.ArcGIS.Geodatabase; +using ESRI.ArcGIS.ADF.CATIDs; +using System.Runtime.InteropServices; + +namespace Postarc +{ + /// <summary> + /// Provides configuration information for ArcCatalog when creating new object or feature classes. + /// The class description can be registered using the GeoObjectClassDescriptions static class in the ESRI.ArcGIS.ADF.CATIDs namespace. + /// </summary> + [Guid("4D5457B8-7378-4457-8FD8-7D6553A93EDD")] + public class PostarcClassDescription : IObjectClassDescription, IFeatureClassDescription + { + public string AliasName + { + get + { + return "Postarc Feature Alias Name"; + } + } + + public ESRI.ArcGIS.esriSystem.UID ClassExtensionCLSID + { + get { return null; } // No class extension + } + + public ESRI.ArcGIS.esriSystem.UID InstanceCLSID + { + get { throw new NotImplementedException(); } + } + + public string ModelName + { + get { throw new NotImplementedException(); } + } + + public bool ModelNameUnique + { + get { throw new NotImplementedException(); } + } + + public string Name + { + get + { + return "ClassDescription_CustomClass"; + } + } + + public IFields RequiredFields + { + get + { + IFieldsEdit fields = new FieldsClass(); + + IFieldEdit field = new FieldClass(); + field.Name_2 = "Shape"; + field.Type_2 = esriFieldType.esriFieldTypeGeometry; + fields.set_Field(1, field); + + return fields; + } + } + + /// <summary> + /// Simple features. + /// </summary> + public esriFeatureType FeatureType + { + get + { + return esriFeatureType.esriFTSimple; + } + } + + public string ShapeFieldName + { + get + { + return "Shape"; + } + } + } +}