[mapguide-commits] r4195 - trunk/MgDev/Common/PlatformBase/Services
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Aug 27 21:06:34 EDT 2009
Author: leaf
Date: 2009-08-27 21:06:33 -0400 (Thu, 27 Aug 2009)
New Revision: 4195
Modified:
trunk/MgDev/Common/PlatformBase/Services/Parameter.cpp
trunk/MgDev/Common/PlatformBase/Services/ServiceRegistry.cpp
Log:
Ticket #1073: Implement MapGuide RFC 80.
1. Fix one issue on MgParameter::Serialize(...) and MgParameter::Deserialize(...) so that MgParameter can be serialized and deserialized correctly.
2. Register classes MgParameterCollection, MgParameter and MgFileFeatureSourceParams so that server can deseralize them correctly.
Modified: trunk/MgDev/Common/PlatformBase/Services/Parameter.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/Parameter.cpp 2009-08-27 17:33:54 UTC (rev 4194)
+++ trunk/MgDev/Common/PlatformBase/Services/Parameter.cpp 2009-08-28 01:06:33 UTC (rev 4195)
@@ -143,7 +143,7 @@
void MgParameter::Serialize(MgStream* stream)
{
CHECK_NULL_PARAMETER(L"MgParameter.Serialize");
- m_parameter->Serialize(stream);
+ stream->WriteObject(m_parameter);
stream->WriteInt32(m_parameterDirection);
}
@@ -156,8 +156,8 @@
/// </param>
void MgParameter::Deserialize(MgStream* stream)
{
- CHECK_NULL_PARAMETER(L"MgParameter.Deserialize");
- m_parameter->Deserialize(stream);
+ SAFE_RELEASE(m_parameter);
+ m_parameter = (MgNullableProperty*)stream->GetObject();
stream->GetInt32(m_parameterDirection);
}
Modified: trunk/MgDev/Common/PlatformBase/Services/ServiceRegistry.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Services/ServiceRegistry.cpp 2009-08-27 17:33:54 UTC (rev 4194)
+++ trunk/MgDev/Common/PlatformBase/Services/ServiceRegistry.cpp 2009-08-28 01:06:33 UTC (rev 4195)
@@ -105,6 +105,7 @@
fact->Register(PlatformBase_Collection_PropertyDefinitionCollection, MgPropertyDefinitionCollection::CreateObject);
fact->Register(PlatformBase_Collection_SerializableCollection, MgSerializableCollection::CreateObject);
fact->Register(PlatformBase_Collection_StringPropertyCollection, MgStringPropertyCollection::CreateObject);
+ fact->Register(PlatformBase_Collection_ParameterCollection, MgParameterCollection::CreateObject);
fact->Register(PlatformBase_Data_Color, MgColor::CreateObject);
fact->Register(PlatformBase_Data_Point3D, MgPoint3D::CreateObject);
@@ -131,6 +132,7 @@
fact->Register(PlatformBase_FeatureService_GeometricPropertyDefinition, MgGeometricPropertyDefinition::CreateObject);
fact->Register(PlatformBase_FeatureService_GeometryProperty, MgGeometryProperty::CreateObject);
fact->Register(PlatformBase_FeatureService_ObjectPropertyDefinition, MgObjectPropertyDefinition::CreateObject);
+ fact->Register(PlatformBase_FeatureService_Parameter, MgParameter::CreateObject);
fact->Register(PlatformBase_FeatureService_SpatialContextReader, MgSpatialContextReader::CreateObject);
fact->Register(PlatformBase_FeatureService_FeatureSet, MgFeatureSet::CreateObject);
fact->Register(PlatformBase_FeatureService_FeatureProperty, MgFeatureProperty::CreateObject);
@@ -152,6 +154,7 @@
fact->Register(PlatformBase_FeatureService_FeatureSchemaCollection, MgFeatureSchemaCollection::CreateObject);
fact->Register(PlatformBase_FeatureService_ClassDefinitionCollection, MgClassDefinitionCollection::CreateObject);
fact->Register(PlatformBase_FeatureService_CreateSdfParams, MgCreateSdfParams::CreateObject);
+ fact->Register(PlatformBase_FeatureService_FileFeatureSourceParams, MgFileFeatureSourceParams::CreateObject);
fact->Register(PlatformBase_ResourceService_ResourceIdentifier, MgResourceIdentifier::CreateObject);
More information about the mapguide-commits
mailing list