[mapguide-commits] r9508 - sandbox/jng/tiling_v2/Server/src/Services/Rendering

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon May 27 03:05:42 PDT 2019


Author: jng
Date: 2019-05-27 03:05:41 -0700 (Mon, 27 May 2019)
New Revision: 9508

Added:
   sandbox/jng/tiling_v2/Server/src/Services/Rendering/OpRenderTileFromMetatile.cpp
   sandbox/jng/tiling_v2/Server/src/Services/Rendering/OpRenderTileFromMetatile.h
Log:
Add missing source files

Added: sandbox/jng/tiling_v2/Server/src/Services/Rendering/OpRenderTileFromMetatile.cpp
===================================================================
--- sandbox/jng/tiling_v2/Server/src/Services/Rendering/OpRenderTileFromMetatile.cpp	                        (rev 0)
+++ sandbox/jng/tiling_v2/Server/src/Services/Rendering/OpRenderTileFromMetatile.cpp	2019-05-27 10:05:41 UTC (rev 9508)
@@ -0,0 +1,109 @@
+//
+//  Copyright (C) 2004-2019 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.
+//
+//  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
+
+#include "OpRenderTileFromMetatile.h"
+
+MgOpRenderTileFromMetatile::MgOpRenderTileFromMetatile()
+{
+}
+
+MgOpRenderTileFromMetatile::~MgOpRenderTileFromMetatile()
+{
+}
+
+void MgOpRenderTileFromMetatile::Execute()
+{
+    ACE_DEBUG((LM_DEBUG, ACE_TEXT("  (%t) MgOpRenderTileFromMetatile::Execute()\n")));
+
+    MG_LOG_OPERATION_MESSAGE(L"MgOpRenderTileFromMetatile");
+
+    MG_TRY()
+
+    MG_LOG_OPERATION_MESSAGE_INIT(m_packet.m_OperationVersion, m_packet.m_NumArguments);
+
+    ACE_ASSERT(m_stream != NULL);
+
+    if (5 == m_packet.m_NumArguments)
+    {
+        Ptr<MgMap> map = (MgMap*)m_stream->GetObject();
+        Ptr<MgResourceIdentifier> resource = map->GetResourceId();
+        map->SetDelayedLoadResourceService(m_resourceService);
+
+        Ptr<MgMetatile> metaTile = (MgMetatile*)m_stream->GetObject();
+
+        STRING rendererName;
+        m_stream->GetString(rendererName);
+
+        INT32 subTileX = 0;
+        m_stream->GetInt32(subTileX);
+
+        INT32 subTileY = 0;
+        m_stream->GetInt32(subTileY);
+
+        BeginExecution();
+
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"MgMetatile[");
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(metaTile->GetMetaTilingFactor());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(metaTile->GetMetaTilingFactor());
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(L"]");
+        
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(rendererName.c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(subTileX);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(subTileY);
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+        Validate();
+
+        Ptr<MgByteReader> tile = m_service->RenderTileFromMetaTile(map, metaTile, rendererName, subTileX, subTileY);
+
+        EndExecution(tile);
+    }
+    else
+    {
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+    }
+
+    if (!m_argsRead)
+    {
+        throw new MgOperationProcessingException(L"MgOpRenderTileFromMetatile.Execute",
+            __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_CATCH(L"MgOpRenderTileFromMetatile.Execute")
+
+    if (mgException != NULL)
+    {
+        // Failed operation
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+    }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_THROW()
+}
\ No newline at end of file

Added: sandbox/jng/tiling_v2/Server/src/Services/Rendering/OpRenderTileFromMetatile.h
===================================================================
--- sandbox/jng/tiling_v2/Server/src/Services/Rendering/OpRenderTileFromMetatile.h	                        (rev 0)
+++ sandbox/jng/tiling_v2/Server/src/Services/Rendering/OpRenderTileFromMetatile.h	2019-05-27 10:05:41 UTC (rev 9508)
@@ -0,0 +1,32 @@
+//
+//  Copyright (C) 2004-2019 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.
+//
+//  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_OP_RENDER_TILE_FROM_METATILE_H
+#define MG_OP_RENDER_TILE_FROM_METATILE_H
+
+#include "RenderingOperation.h"
+
+class MgOpRenderTileFromMetatile : public MgRenderingOperation
+{
+public:
+    MgOpRenderTileFromMetatile();
+    virtual ~MgOpRenderTileFromMetatile();
+
+public:
+    virtual void Execute();
+};
+
+#endif
\ No newline at end of file



More information about the mapguide-commits mailing list