Version 2 (modified by 18 years ago) ( diff ) | ,
---|
MapGuide RFC 9 - Add Convenience Methods to MgLayerBase
This page contains an change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.
Status
RFC Template Version | (1.0) |
Submission Date | February 10, 2007 |
Last Modified | Bob Bray Timestamp |
Author | Bob Bray |
RFC Status | draft |
Implementation Status | pending |
Proposed Milestone | 1.2 |
Assigned PSC guide(s) | (when determined) |
Voting History | (vote date) |
+1 | |
+0 | |
-0 | |
-1 |
Overview
This section brefly describes the problem set, and the proposed solution in general terms. It should be deliberately short, a couple of sentences or so.
Motivation
This is the most important part of the RFC. It describes the problem domain in detail. Focusing on this will allow reviewers to fully understand why the proposed change is being made, and potentially suggest different/better ways of accomplishing the desired results. The more time we spend on understanding the problem, the better our solution will be.
Proposed Solution
/// <summary> /// Gets the class definition for the feature class of the layer. If the /// feature class of the layer is extended with properties from other feature /// classes, then all those properties are also contained in the returned /// class definition. /// </summary> /// <returns> /// Returns an MgClassDefinition instance for the specified / class name. /// </returns> virtual MgClassDefinition* GetClassDefinition(); /// <summary> /// Selects features from a feature source according to the /// criteria set in the MgFeatureQueryOptions argument The /// criteria are applied to all of the features in the feature /// source. If you want to apply the criteria to a subset of the /// features, use the MgLayerBase::SelectAggregate Method. /// </summary> /// <param name="options"> /// MgFeatureQueryOptions instance containing all required filters for /// this select operation. /// </param> /// <returns> /// Returns an MgFeatureReader containing the set of selected /// features. /// </returns> virtual MgFeatureReader* SelectFeatures(MgFeatureQueryOptions *options); /// <summary> /// Selects groups of features from a feature source and applies /// filters to each of the groups according to the criteria set /// in the MgFeatureAggregateOptions argument. If you want to /// apply the criteria to all features without grouping them, use /// the MgLayerBase::SelectFeatures Method. /// </summary> /// <param name="options"> /// An MgFeatureAggregateOptions instance containing all the criteria and /// filters required for this select operation. /// </param> /// <returns> /// Returns an MgDataReader containing the group values. /// </returns> virtual MgDataReader* SelectAggregate(MgFeatureAggregateOptions* options); /// <summary> /// Executes the MgDeleteFeatures, MgInsertFeatures, /// MgUpdateFeatures, MgLockFeatures or MgUnlockFeatures commands /// contained in the given MgFeatureCommandCollection object. /// </summary> /// <param name="commands">A collection of feature commands to be /// executed.</param> /// <returns> /// Returns an MgPropertyCollection object. Each property in the /// collection corresponds to a command in the MgFeatureCommandCollection /// argument. The property name is the index of the command in the feature /// command collection. /// </returns> virtual MgPropertyCollection* UpdateFeatures(MgFeatureCommandCollection* commands);
Implications
Because these are additions to the API no compatibility issues exist. However in order to take advantage of the new methods users will need to call one of the new MgMap constructors. If they do not the new methods will throw an exception.
Test Plan
API Unit Tests will be added to test the new MgLayerBase methods.
Funding/Resources
Autodesk will supply the resources to implement this RFC.