[mapguide-commits] r6112 - in trunk/MgDev/Common: MdfModel MdfParser
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Sep 2 02:32:13 EDT 2011
Author: waltweltonlair
Date: 2011-09-01 23:32:13 -0700 (Thu, 01 Sep 2011)
New Revision: 6112
Modified:
trunk/MgDev/Common/MdfModel/ProfileRenderSelectionResult.cpp
trunk/MgDev/Common/MdfModel/UnicodeString.cpp
trunk/MgDev/Common/MdfParser/SAX2Parser.cpp
Log:
Miscellaneous minor changes
* updated comments in SAX2Parser
* added two blanks lines in between methods
* added missing newline at end of file
* slight simplification to recent change to UnicodeString.cpp
Modified: trunk/MgDev/Common/MdfModel/ProfileRenderSelectionResult.cpp
===================================================================
--- trunk/MgDev/Common/MdfModel/ProfileRenderSelectionResult.cpp 2011-09-02 05:43:13 UTC (rev 6111)
+++ trunk/MgDev/Common/MdfModel/ProfileRenderSelectionResult.cpp 2011-09-02 06:32:13 UTC (rev 6112)
@@ -49,4 +49,4 @@
return _CrtDumpMemoryLeaks();
}
#endif
-#endif
\ No newline at end of file
+#endif
Modified: trunk/MgDev/Common/MdfModel/UnicodeString.cpp
===================================================================
--- trunk/MgDev/Common/MdfModel/UnicodeString.cpp 2011-09-02 05:43:13 UTC (rev 6111)
+++ trunk/MgDev/Common/MdfModel/UnicodeString.cpp 2011-09-02 06:32:13 UTC (rev 6112)
@@ -20,13 +20,11 @@
#include "ConvertUTF.h"
#define UTFCONVERT(FROMCHARSET,TOCHARSET) \
- if (uniChar == NULL)\
- {\
+ if (!str.empty())\
str.clear();\
+\
+ if (uniChar == NULL)\
return;\
- }\
- if ( !str.empty() )\
- str.clear();\
\
size_t size = 0;\
\
Modified: trunk/MgDev/Common/MdfParser/SAX2Parser.cpp
===================================================================
--- trunk/MgDev/Common/MdfParser/SAX2Parser.cpp 2011-09-02 05:43:13 UTC (rev 6111)
+++ trunk/MgDev/Common/MdfParser/SAX2Parser.cpp 2011-09-02 06:32:13 UTC (rev 6112)
@@ -256,6 +256,7 @@
return ret;
}
+
// Returns a reference to the parser's profile result
// After this call the parser no longer owns the object.
ProfileResult* SAX2Parser::DetachProfileResult()
@@ -265,6 +266,7 @@
return ret;
}
+
bool SAX2Parser::GetSucceeded() const
{
return m_succeeded;
@@ -430,6 +432,7 @@
fd.close();
}
+
void SAX2Parser::WriteToFile(std::string name, ProfileResult* profileResult, Version* version)
{
std::ofstream fd;
@@ -445,6 +448,7 @@
fd.close();
}
+
std::string SAX2Parser::SerializeToXML(MapDefinition* map, Version* version)
{
MdfStringStream fd;
@@ -531,6 +535,7 @@
return fd.str();
}
+
std::string SAX2Parser::SerializeToXML(ProfileResult* profileResult, Version* version)
{
MdfStringStream fd;
@@ -542,6 +547,7 @@
return fd.str();
}
+
void SAX2Parser::startElement(const XMLCh* const uri,
const XMLCh* const localname,
const XMLCh* const qname,
@@ -835,9 +841,6 @@
void SAX2Parser::SetWatermarkDefinitionVersion(const Attributes& attributes)
{
- // Although right now we only have 1.0.0 here, this function is still
- // needed for future expansion.
-
// check for a version attribute
int index = attributes.getIndex(W2X(L"version"));
const XMLCh* verValue = (index >= 0)? attributes.getValue(index) : NULL;
@@ -860,16 +863,17 @@
}
}
+
void SAX2Parser::SetProfileResultVersion(const Attributes& attributes)
{
- // Although right now we only have 1.0.0 here, this function is still
+ // Although right now we only have 2.4.0 here, this function is still
// needed for future expansion.
// check for a version attribute
int index = attributes.getIndex(W2X(L"version"));
const XMLCh* verValue = (index >= 0)? attributes.getValue(index) : NULL;
- // according to the schema watermark definition elements require a version
+ // according to the schema profile result elements require a version
// attribute, but users may generate XML which is missing this attribute
if (verValue)
{
@@ -885,6 +889,7 @@
}
}
+
MapDefinition* SAX2Parser::CreateClone(MapDefinition* map)
{
_ASSERT(NULL != map);
@@ -974,6 +979,7 @@
return parser.DetachWatermarkDefinition();
}
+
ProfileResult* SAX2Parser::CreateClone(ProfileResult* profileResult)
{
_ASSERT(NULL != profileResult);
More information about the mapguide-commits
mailing list