= !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 [wiki:MapGuideRfcs 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 == {{{ /// /// 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. /// /// /// Returns an MgClassDefinition instance for the specified / class name. /// virtual MgClassDefinition* GetClassDefinition(); /// /// 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. /// /// /// MgFeatureQueryOptions instance containing all required filters for /// this select operation. /// /// /// Returns an MgFeatureReader containing the set of selected /// features. /// virtual MgFeatureReader* SelectFeatures(MgFeatureQueryOptions *options); /// /// 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. /// /// /// An MgFeatureAggregateOptions instance containing all the criteria and /// filters required for this select operation. /// /// /// Returns an MgDataReader containing the group values. /// virtual MgDataReader* SelectAggregate(MgFeatureAggregateOptions* options); /// /// Executes the MgDeleteFeatures, MgInsertFeatures, /// MgUpdateFeatures, MgLockFeatures or MgUnlockFeatures commands /// contained in the given MgFeatureCommandCollection object. /// /// A collection of feature commands to be /// executed. /// /// 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. /// 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.