[mapguide-commits] r8222 - sandbox/jng/v30/Common/MapGuideCommon/MapLayer

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Jun 14 17:35:50 PDT 2014


Author: jng
Date: 2014-06-14 17:35:49 -0700 (Sat, 14 Jun 2014)
New Revision: 8222

Modified:
   sandbox/jng/v30/Common/MapGuideCommon/MapLayer/Map.h
Log:
And now for the MgMap API removal itself. We're not removing the actual methods from MgMap. We're just demoting them from PUBLISHED_API to INTERNAL_API, so that they are still accessible from C++ code where usage is still legitimate.

Modified: sandbox/jng/v30/Common/MapGuideCommon/MapLayer/Map.h
===================================================================
--- sandbox/jng/v30/Common/MapGuideCommon/MapLayer/Map.h	2014-06-15 00:33:59 UTC (rev 8221)
+++ sandbox/jng/v30/Common/MapGuideCommon/MapLayer/Map.h	2014-06-15 00:35:49 UTC (rev 8222)
@@ -70,14 +70,11 @@
 ///     $site = $siteConnection->GetSite();
 ///     $sessionID = $site->CreateSession();
 ///     $user->SetMgSessionId($sessionID);
-///     // Get an instance of the required services.
-///     $resourceService = $siteConnection->CreateService(MgServiceType::ResourceService);
-///     $mappingService = $siteConnection->CreateService(MgServiceType::MappingService);
 ///
 ///     // Get a runtime map from a map definition
 ///     $resourceID = new  MgResourceIdentifier('Library://Calgary/Maps/Calgary.MapDefinition');
-///     $map = new MgMap();
-///     $map->Create($resourceService, $resourceID, 'Calgary');
+///     $map = new MgMap($site);
+///     $map->Create($resourceID, 'Calgary');
 ///
 ///     // Show information about the map
 ///     echo "Name of map:               '" . $map->GetName() . "'n";
@@ -239,37 +236,6 @@
 
     //////////////////////////////////////////////////////////////////
     /// \brief
-    /// Constructs an empty un-initialized MgMap object.
-    ///
-    /// \deprecated
-    /// This method has been deprecated. Use the following method:
-    /// \link MgMap(MgSiteConnection*) MgMap(MgSiteConnection* siteConnection) \endlink.
-    ///
-    /// <!-- Syntax in .Net, Java, and PHP -->
-    /// \htmlinclude DotNetSyntaxTop.html
-    /// MgMap();
-    /// \htmlinclude SyntaxBottom.html
-    /// \htmlinclude JavaSyntaxTop.html
-    /// MgMap();
-    /// \htmlinclude SyntaxBottom.html
-    /// \htmlinclude PHPSyntaxTop.html
-    /// MgMap();
-    /// \htmlinclude SyntaxBottom.html
-    ///
-    /// \remarks
-    /// If you use this constructor, the following methods of the associated layer objects
-    /// are not available to be used.
-    ///  \li MgLayerBase::GetClassDefinition()
-    ///  \li MgLayerBase::SelectFeatures(MgFeatureQueryOptions*)
-    ///  \li MgLayerBase::SelectAggregate(MgFeatureAggregateOptions*)
-    ///  \li MgLayerBase::UpdateFeatures(MgFeatureCommandCollection*)
-    ///
-    /// To take advantage of these methods, you must use the following method instead:
-    /// \link MgMap(MgSiteConnection*) MgMap(MgSiteConnection* siteConnection) \endlink
-    MgMap();
-
-    //////////////////////////////////////////////////////////////////
-    /// \brief
     /// Constructs an MgMap object that takes an MgSiteConnection instance.
     ///
     /// \remarks
@@ -310,49 +276,6 @@
 
     //////////////////////////////////////////////////////////////////
     /// \brief
-    /// Initializes a new MgMap object given a resource service, map
-    /// definition, and a name for the map. This method is used for
-    /// MapGuide Viewers or for offline map production.
-    ///
-    /// \deprecated
-    /// This method has been deprecated. Use the following method:
-    /// \link MgMap::Create(MgResourceIdentifier*,CREFSTRING) Create(MgResourceIdentifier mapDefinition, string mapName) \endlink.
-    ///
-    /// <!-- Syntax in .Net, Java, and PHP -->
-    /// \htmlinclude DotNetSyntaxTop.html
-    /// void Create(MgResourceService resourceService, MgResourceIdentifier mapDefinition, string mapName);
-    /// \htmlinclude SyntaxBottom.html
-    /// \htmlinclude JavaSyntaxTop.html
-    /// void Create(MgResourceService resourceService, MgResourceIdentifier mapDefinition, String mapName);
-    /// \htmlinclude SyntaxBottom.html
-    /// \htmlinclude PHPSyntaxTop.html
-    /// void Create(MgResourceService resourceService, MgResourceIdentifier mapDefinition, string mapName);
-    /// \htmlinclude SyntaxBottom.html
-    ///
-    /// \param resourceService
-    /// An MgResourceService that can be used to
-    /// retrieve the map definition.
-    /// \param mapDefinition
-    /// An MgResourceIdentifier that specifies the
-    /// location of the map definition in a resource
-    /// repository.
-    /// \param mapName
-    /// A string that specifies the name of the map.
-    ///
-    /// <!-- Example (PHP) -->
-    /// \htmlinclude PHPExampleTop.html
-    /// \code
-    /// // Assuming the resource service has already been intialized
-    /// $resourceID = new  MgResourceIdentifier('Library://Calgary/Maps/Calgary.MapDefinition');
-    /// $map = new MgMap();
-    /// $map->Create($resourceService, $resourceID, 'Calgary');
-    /// \endcode
-    /// \htmlinclude ExampleBottom.html
-    ///
-    virtual void Create(MgResourceService* resourceService, MgResourceIdentifier* mapDefinition, CREFSTRING mapName);
-
-    //////////////////////////////////////////////////////////////////
-    /// \brief
     /// Initializes a new MgMap object given a map definition
     /// and a name for the map. This method is used for
     /// MapGuide Viewers or for offline map production.
@@ -422,52 +345,6 @@
     /// \brief
     /// Loads the map object from a session repository.
     ///
-    /// \deprecated
-    /// This method has been deprecated. Use the following method:
-    /// \link MgMap::Open(CREFSTRING) Open(string mapName) \endlink.
-    /// For more information, see \link Maps_and_Layers_Module Maps and Layers \endlink.
-    ///
-    /// <!-- Syntax in .Net, Java, and PHP -->
-    /// \htmlinclude DotNetSyntaxTop.html
-    /// virtual void Open(MgResourceService resourceService, string mapName);
-    /// \htmlinclude SyntaxBottom.html
-    /// \htmlinclude JavaSyntaxTop.html
-    /// virtual void Open(MgResourceService resourceService, String mapName);
-    /// \htmlinclude SyntaxBottom.html
-    /// \htmlinclude PHPSyntaxTop.html
-    /// virtual void Open(MgResourceService resourceService, string mapName);
-    /// \htmlinclude SyntaxBottom.html
-    ///
-    /// \param resourceService
-    /// An MgResourceService that can be used to retrieve
-    /// the map.
-    /// \param mapName
-    /// A string that specifies the name of the map. This
-    /// is the name that was specified when \link MgMapBase::Create Create \endlink
-    /// was called to create the map object.
-    ///
-    /// \return
-    /// Returns nothing.
-    ///
-    /// <!-- Example (PHP) -->
-    /// \htmlinclude PHPExampleTop.html
-    /// \code
-    /// // Assuming the resource service has already been initialized
-    /// $map = new MgMap();
-    /// $map->Open($resourceService, 'Calgary');
-    /// \endcode
-    /// \htmlinclude ExampleBottom.html
-    ///
-    /// \todo
-    ///   * [[Job for Philip: If I move that overview to the
-    ///     Developer's Guide, update the xref here.]]
-    ///
-    virtual void Open(MgResourceService* resourceService, CREFSTRING mapName);
-
-    //////////////////////////////////////////////////////////////////
-    /// \brief
-    /// Loads the map object from a session repository.
-    ///
     /// \remarks
     /// For more information, see \link Maps_and_Layers_Module Maps and Layers \endlink.
     ///
@@ -505,21 +382,6 @@
     ///
     virtual void Open(CREFSTRING mapName);
 
-    ///////////////////////////////////////////////////////////////
-    /// \brief
-    /// Saves the Map using the specified resource service.
-    ///
-    /// \deprecated
-    /// This method has been deprecated. Use the following method:
-    /// \link Save() Save() \endlink.
-    /// This method assumes a valid resource identifier has already
-    /// been established via either Open or Save.
-    ///
-    /// \param resourceService
-    /// Resource service.
-    ///
-    void Save(MgResourceService* resourceService);
-
     //////////////////////////////////////////////////////////////////////
     /// \brief
     /// Saves the Map using the specified resource service and
@@ -552,7 +414,38 @@
 
 INTERNAL_API:
 
+    //////////////////////////////////////////////////////////////////
     /// \brief
+    /// Constructs an empty un-initialized MgMap object.
+    ///
+    /// \deprecated
+    /// This method has been deprecated. Use the following method:
+    /// \link MgMap(MgSiteConnection*) MgMap(MgSiteConnection* siteConnection) \endlink.
+    ///
+    /// <!-- Syntax in .Net, Java, and PHP -->
+    /// \htmlinclude DotNetSyntaxTop.html
+    /// MgMap();
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude JavaSyntaxTop.html
+    /// MgMap();
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude PHPSyntaxTop.html
+    /// MgMap();
+    /// \htmlinclude SyntaxBottom.html
+    ///
+    /// \remarks
+    /// If you use this constructor, the following methods of the associated layer objects
+    /// are not available to be used.
+    ///  \li MgLayerBase::GetClassDefinition()
+    ///  \li MgLayerBase::SelectFeatures(MgFeatureQueryOptions*)
+    ///  \li MgLayerBase::SelectAggregate(MgFeatureAggregateOptions*)
+    ///  \li MgLayerBase::UpdateFeatures(MgFeatureCommandCollection*)
+    ///
+    /// To take advantage of these methods, you must use the following method instead:
+    /// \link MgMap(MgSiteConnection*) MgMap(MgSiteConnection* siteConnection) \endlink
+    MgMap();
+
+    /// \brief
     /// Destruct a MgMap object
     ///
     /// \return
@@ -562,6 +455,110 @@
 
     //////////////////////////////////////////////////////////////////
     /// \brief
+    /// Initializes a new MgMap object given a resource service, map
+    /// definition, and a name for the map. This method is used for
+    /// MapGuide Viewers or for offline map production.
+    ///
+    /// \deprecated
+    /// This method has been deprecated. Use the following method:
+    /// \link MgMap::Create(MgResourceIdentifier*,CREFSTRING) Create(MgResourceIdentifier mapDefinition, string mapName) \endlink.
+    ///
+    /// <!-- Syntax in .Net, Java, and PHP -->
+    /// \htmlinclude DotNetSyntaxTop.html
+    /// void Create(MgResourceService resourceService, MgResourceIdentifier mapDefinition, string mapName);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude JavaSyntaxTop.html
+    /// void Create(MgResourceService resourceService, MgResourceIdentifier mapDefinition, String mapName);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude PHPSyntaxTop.html
+    /// void Create(MgResourceService resourceService, MgResourceIdentifier mapDefinition, string mapName);
+    /// \htmlinclude SyntaxBottom.html
+    ///
+    /// \param resourceService
+    /// An MgResourceService that can be used to
+    /// retrieve the map definition.
+    /// \param mapDefinition
+    /// An MgResourceIdentifier that specifies the
+    /// location of the map definition in a resource
+    /// repository.
+    /// \param mapName
+    /// A string that specifies the name of the map.
+    ///
+    /// <!-- Example (PHP) -->
+    /// \htmlinclude PHPExampleTop.html
+    /// \code
+    /// // Assuming the resource service has already been intialized
+    /// $resourceID = new  MgResourceIdentifier('Library://Calgary/Maps/Calgary.MapDefinition');
+    /// $map = new MgMap();
+    /// $map->Create($resourceService, $resourceID, 'Calgary');
+    /// \endcode
+    /// \htmlinclude ExampleBottom.html
+    ///
+    virtual void Create(MgResourceService* resourceService, MgResourceIdentifier* mapDefinition, CREFSTRING mapName);
+
+    //////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Loads the map object from a session repository.
+    ///
+    /// \deprecated
+    /// This method has been deprecated. Use the following method:
+    /// \link MgMap::Open(CREFSTRING) Open(string mapName) \endlink.
+    /// For more information, see \link Maps_and_Layers_Module Maps and Layers \endlink.
+    ///
+    /// <!-- Syntax in .Net, Java, and PHP -->
+    /// \htmlinclude DotNetSyntaxTop.html
+    /// virtual void Open(MgResourceService resourceService, string mapName);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude JavaSyntaxTop.html
+    /// virtual void Open(MgResourceService resourceService, String mapName);
+    /// \htmlinclude SyntaxBottom.html
+    /// \htmlinclude PHPSyntaxTop.html
+    /// virtual void Open(MgResourceService resourceService, string mapName);
+    /// \htmlinclude SyntaxBottom.html
+    ///
+    /// \param resourceService
+    /// An MgResourceService that can be used to retrieve
+    /// the map.
+    /// \param mapName
+    /// A string that specifies the name of the map. This
+    /// is the name that was specified when \link MgMapBase::Create Create \endlink
+    /// was called to create the map object.
+    ///
+    /// \return
+    /// Returns nothing.
+    ///
+    /// <!-- Example (PHP) -->
+    /// \htmlinclude PHPExampleTop.html
+    /// \code
+    /// // Assuming the resource service has already been initialized
+    /// $map = new MgMap();
+    /// $map->Open($resourceService, 'Calgary');
+    /// \endcode
+    /// \htmlinclude ExampleBottom.html
+    ///
+    /// \todo
+    ///   * [[Job for Philip: If I move that overview to the
+    ///     Developer's Guide, update the xref here.]]
+    ///
+    virtual void Open(MgResourceService* resourceService, CREFSTRING mapName);
+
+    ///////////////////////////////////////////////////////////////
+    /// \brief
+    /// Saves the Map using the specified resource service.
+    ///
+    /// \deprecated
+    /// This method has been deprecated. Use the following method:
+    /// \link Save() Save() \endlink.
+    /// This method assumes a valid resource identifier has already
+    /// been established via either Open or Save.
+    ///
+    /// \param resourceService
+    /// Resource service.
+    ///
+    void Save(MgResourceService* resourceService);
+
+    //////////////////////////////////////////////////////////////////
+    /// \brief
     /// Serialize data to a TCP/IP stream.
     ///
     /// \param stream



More information about the mapguide-commits mailing list