[mapguide-commits] r9868 - in sandbox/adsk/trunk: Common/PlatformBase Common/PlatformBase/MapLayer Web/src/DotNetUnmanagedApi/PlatformBase

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Sep 14 20:04:15 PDT 2021


Author: christinebao
Date: 2021-09-14 20:04:13 -0700 (Tue, 14 Sep 2021)
New Revision: 9868

Added:
   sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerGroupOrder.h
Modified:
   sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerBase.h
   sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerGroup.h
   sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.h
   sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.vcxproj
   sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.vcxproj.filters
   sandbox/adsk/trunk/Web/src/DotNetUnmanagedApi/PlatformBase/PlatformBaseApiGen.xml
Log:
Add Order support for layer and group
1. Add base class - MgLayerGroupOrder
2. Change MgLayerBase and MgLayerGroup base class to MgLayerGroupOrder

Modified: sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerBase.h
===================================================================
--- sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerBase.h	2021-09-07 02:05:35 UTC (rev 9867)
+++ sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerBase.h	2021-09-15 03:04:13 UTC (rev 9868)
@@ -1,19 +1,14 @@
 //
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
+// (C) Copyright 2021 by Autodesk, Inc.
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
+// The information contained herein is confidential, proprietary
+// to Autodesk,  Inc.,  and considered a trade secret as defined
+// in section 499C of the penal code of the State of California.
+// Use of  this information  by  anyone  other  than  authorized
+// employees of Autodesk, Inc.  is granted  only under a written
+// non-disclosure agreement,  expressly  prescribing  the  scope
+// and manner of such use.
 //
-//  This library 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
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
 
 #ifndef _MG_LAYER_BASE_H_
 #define _MG_LAYER_BASE_H_
@@ -46,7 +41,7 @@
 /// \brief
 /// Gets and sets properties of a layer.
 /// \todo
-class MG_PLATFORMBASE_API MgLayerBase : public MgNamedSerializable
+class MG_PLATFORMBASE_API MgLayerBase : public MgLayerGroupOrder
 {
     MG_DECL_DYNCREATE()
     DECLARE_CLASSNAME(MgLayerBase)

Modified: sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerGroup.h
===================================================================
--- sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerGroup.h	2021-09-07 02:05:35 UTC (rev 9867)
+++ sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerGroup.h	2021-09-15 03:04:13 UTC (rev 9868)
@@ -1,19 +1,14 @@
 //
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
+// (C) Copyright 2021 by Autodesk, Inc.
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
+// The information contained herein is confidential, proprietary
+// to Autodesk,  Inc.,  and considered a trade secret as defined
+// in section 499C of the penal code of the State of California.
+// Use of  this information  by  anyone  other  than  authorized
+// employees of Autodesk, Inc.  is granted  only under a written
+// non-disclosure agreement,  expressly  prescribing  the  scope
+// and manner of such use.
 //
-//  This library 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
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
 
 #ifndef _MG_LAYER_GROUP_H_
 #define _MG_LAYER_GROUP_H_
@@ -36,7 +31,7 @@
 /// \todo
 ///   * [[Job for Philip: Clarify what a layer group is.]]
 ///   * [[Job for Phliip: Add an example.]]
-class MG_PLATFORMBASE_API MgLayerGroup : public MgNamedSerializable
+class MG_PLATFORMBASE_API MgLayerGroup : public MgLayerGroupOrder
 {
     MG_DECL_DYNCREATE()
     DECLARE_CLASSNAME(MgLayerGroup)

Added: sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerGroupOrder.h
===================================================================
--- sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerGroupOrder.h	                        (rev 0)
+++ sandbox/adsk/trunk/Common/PlatformBase/MapLayer/LayerGroupOrder.h	2021-09-15 03:04:13 UTC (rev 9868)
@@ -0,0 +1,96 @@
+//
+// (C) Copyright 2021 by Autodesk, Inc.
+//
+// The information contained herein is confidential, proprietary
+// to Autodesk,  Inc.,  and considered a trade secret as defined
+// in section 499C of the penal code of the State of California.
+// Use of  this information  by  anyone  other  than  authorized
+// employees of Autodesk, Inc.  is granted  only under a written
+// non-disclosure agreement,  expressly  prescribing  the  scope
+// and manner of such use.
+//
+
+#pragma once
+
+/////////////////////////////////////////////////////////////////
+/// \cond INTERNAL
+/// Get and Set Layer and Group Order in current group in Display Manager.
+class MG_PLATFORMBASE_API MgLayerGroupOrder : public MgNamedSerializable
+{
+    MG_DECL_DYNCREATE()
+    DECLARE_CLASSNAME(MgLayerGroupOrder)
+
+EXTERNAL_API:
+    MgLayerGroupOrder() {}
+
+    virtual ~MgLayerGroupOrder() {}
+
+PUBLISHED_API:
+    //////////////////////////////////////////////////////////////////
+    /// Set the order
+    //
+    void SetDMOrder(INT32 order)
+    {
+        m_orderInGroup = order;
+    }
+
+    //////////////////////////////////////////////////////////////////
+    /// Get the order
+    //
+    INT32 GetDMOrder()
+    {
+        return m_orderInGroup;
+    }
+
+INTERNAL_API:
+
+    //////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Get the name of the object.
+    ///
+    /// \return
+    /// Returns the name of object
+    ///
+    virtual STRING GetName() { return L""; }
+
+    //////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Does it allow to set the name
+    ///
+    /// \return
+    /// true - allows to set the name
+    /// false - can not set the name
+    ///
+    virtual bool CanSetName() { return false; }
+
+    //////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Serialize data to a stream
+    ///
+    /// \param stream
+    /// Stream
+    ///
+    virtual void Serialize(MgStream* stream) {}
+
+    //////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Deserialize data from a stream
+    ///
+    /// \param stream
+    /// Stream
+    ///
+    virtual void Deserialize(MgStream* stream) {}
+
+    //////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Dispose this object.
+    ///
+    /// \return
+    /// Returns nothing
+    ///
+    virtual void Dispose() {}
+
+private:
+    INT32 m_orderInGroup{ -1 };  // Order in Group in Display Manager
+};
+/// \endcond

Modified: sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.h
===================================================================
--- sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.h	2021-09-07 02:05:35 UTC (rev 9867)
+++ sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.h	2021-09-15 03:04:13 UTC (rev 9868)
@@ -1,19 +1,14 @@
 //
-//  Copyright (C) 2004-2011 by Autodesk, Inc.
+// (C) Copyright 2021 by Autodesk, Inc.
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
+// The information contained herein is confidential, proprietary
+// to Autodesk,  Inc.,  and considered a trade secret as defined
+// in section 499C of the penal code of the State of California.
+// Use of  this information  by  anyone  other  than  authorized
+// employees of Autodesk, Inc.  is granted  only under a written
+// non-disclosure agreement,  expressly  prescribing  the  scope
+// and manner of such use.
 //
-//  This library 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
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
 
 #ifndef MGPLATFORMBASE_H_
 #define MGPLATFORMBASE_H_
@@ -155,6 +150,7 @@
 
 #include "MapLayer/LayerType.h"
 #include "MapLayer/LayerGroupType.h"
+#include "MapLayer/LayerGroupOrder.h"
 #include "MapLayer/LayerBase.h"
 #include "MapLayer/LayerCollection.h"
 #include "MapLayer/LayerGroup.h"

Modified: sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.vcxproj
===================================================================
--- sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.vcxproj	2021-09-07 02:05:35 UTC (rev 9867)
+++ sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.vcxproj	2021-09-15 03:04:13 UTC (rev 9868)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
@@ -897,6 +897,7 @@
     <ClInclude Include="Exception\ServiceNotAvailableException.h" />
     <ClInclude Include="Exception\ServiceNotSupportedException.h" />
     <ClInclude Include="Exception\UserNotFoundException.h" />
+    <ClInclude Include="MapLayer\LayerGroupOrder.h" />
     <ClInclude Include="Services\BaseService.h" />
     <ClInclude Include="Services\BaseServiceDefs.h" />
     <ClInclude Include="Services\ClassDefinition.h" />

Modified: sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.vcxproj.filters
===================================================================
--- sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.vcxproj.filters	2021-09-07 02:05:35 UTC (rev 9867)
+++ sandbox/adsk/trunk/Common/PlatformBase/PlatformBase.vcxproj.filters	2021-09-15 03:04:13 UTC (rev 9868)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
     <Filter Include="Data">
@@ -736,6 +736,9 @@
     <ClInclude Include="Services\GeoJsonWriter.h">
       <Filter>Services</Filter>
     </ClInclude>
+    <ClInclude Include="MapLayer\LayerGroupOrder.h">
+      <Filter>MapLayer</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="PlatformBase.rc" />

Modified: sandbox/adsk/trunk/Web/src/DotNetUnmanagedApi/PlatformBase/PlatformBaseApiGen.xml
===================================================================
--- sandbox/adsk/trunk/Web/src/DotNetUnmanagedApi/PlatformBase/PlatformBaseApiGen.xml	2021-09-07 02:05:35 UTC (rev 9867)
+++ sandbox/adsk/trunk/Web/src/DotNetUnmanagedApi/PlatformBase/PlatformBaseApiGen.xml	2021-09-15 03:04:13 UTC (rev 9868)
@@ -168,6 +168,7 @@
     <Header path="../../../../Common/PlatformBase/Services/UpdateFeatures.h" />
     <Header path="../../../../Common/PlatformBase/Services/Warnings.h" />
 
+    <Header path="../../../../Common/PlatformBase/MapLayer/LayerGroupOrder.h" />
     <Header path="../../../../Common/PlatformBase/MapLayer/LayerBase.h" />
     <Header path="../../../../Common/PlatformBase/MapLayer/LayerCollection.h" />
     <Header path="../../../../Common/PlatformBase/MapLayer/LayerGroup.h" />



More information about the mapguide-commits mailing list