[commit] r1089 - trunk/GME/ObjectInspector
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Fri Nov 19 12:59:23 CST 2010
Author: volgy
Date: Fri Nov 19 12:59:23 2010
New Revision: 1089
Log:
Implementing GME-265: Description preference (multiline) of FCOs
Modified:
trunk/GME/ObjectInspector/Attribute.cpp
trunk/GME/ObjectInspector/ItemData.cpp
trunk/GME/ObjectInspector/ItemData.h
trunk/GME/ObjectInspector/Preference.cpp
Modified: trunk/GME/ObjectInspector/Attribute.cpp
==============================================================================
--- trunk/GME/ObjectInspector/Attribute.cpp Wed Nov 17 15:28:50 2010 (r1088)
+++ trunk/GME/ObjectInspector/Attribute.cpp Fri Nov 19 12:59:23 2010 (r1089)
@@ -20,26 +20,7 @@
_T("Current version string"),
_T("Arbitrary comments"),
};
-// Split Function
-inline void str_split( CString str, CStringArray &returnArray)
-{
- int iNum = 0;
- int iCurrPos = 0;
- while( -1 != (iCurrPos = str.FindOneOf(_T("\n"))))
- {
- returnArray.Add(str.Left(iCurrPos));
- returnArray[iNum].TrimRight("\r\n");
- str = str.Right(str.GetLength() - iCurrPos - 1);
- iNum++;
- }
-
- if (str.GetLength() > 0) // the last one...
- {
- returnArray.Add(str);
- returnArray[iNum].TrimRight("\r\n");
- iNum++;
- }
-}
+
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
Modified: trunk/GME/ObjectInspector/ItemData.cpp
==============================================================================
--- trunk/GME/ObjectInspector/ItemData.cpp Wed Nov 17 15:28:50 2010 (r1088)
+++ trunk/GME/ObjectInspector/ItemData.cpp Fri Nov 19 12:59:23 2010 (r1089)
@@ -13,6 +13,27 @@
#define new DEBUG_NEW
#endif
+// Split Function
+void str_split( CString str, CStringArray &returnArray)
+{
+ int iNum = 0;
+ int iCurrPos = 0;
+ while( -1 != (iCurrPos = str.FindOneOf(_T("\n"))))
+ {
+ returnArray.Add(str.Left(iCurrPos));
+ returnArray[iNum].TrimRight("\r\n");
+ str = str.Right(str.GetLength() - iCurrPos - 1);
+ iNum++;
+ }
+
+ if (str.GetLength() > 0) // the last one...
+ {
+ returnArray.Add(str);
+ returnArray[iNum].TrimRight("\r\n");
+ iNum++;
+ }
+}
+
/*static*/ const char * CItemData::m_defFMTSTR = "%.12g";
/*static*/ CString CItemData::m_fmtStr = "%.12g";
//////////////////////////////////////////////////////////////////////
Modified: trunk/GME/ObjectInspector/ItemData.h
==============================================================================
--- trunk/GME/ObjectInspector/ItemData.h Wed Nov 17 15:28:50 2010 (r1088)
+++ trunk/GME/ObjectInspector/ItemData.h Fri Nov 19 12:59:23 2010 (r1089)
@@ -11,6 +11,8 @@
#include "CompassData.h"
+void str_split( CString str, CStringArray &returnArray);
+
enum itemdata_enum
{
ITEMDATA_NULL = 0,
Modified: trunk/GME/ObjectInspector/Preference.cpp
==============================================================================
--- trunk/GME/ObjectInspector/Preference.cpp Wed Nov 17 15:28:50 2010 (r1088)
+++ trunk/GME/ObjectInspector/Preference.cpp Fri Nov 19 12:59:23 2010 (r1089)
@@ -40,6 +40,7 @@
{"COLOR", "color", "0x000000", "Color", "Connection line color. Set this value to change the connection line color."},
{"COLOR", "nameColor", "0x000000", "Name color", "Connection label color. Set this value to change the connection label color."},
{"STRING", "help", "", "Help URL", "Sets this value to specify the URL containig the help information belonging to the connection."},
+ {"MULTISTRING", "description", "", "Description", "Free format description of the model element for documentation purposes."},
{"LINE_STYLE_LIST", "srcStyle", "butt", "Source end style", "Sets this value to specify the source end style of the connection. Eg. Arrow."},
{"LINE_STYLE_LIST", "dstStyle", "butt", "Destination end style", "Sets this value to specify the destination end style of the connection. Eg. Arrow."},
{"LINE_TYPE_LIST", "lineType", "solid", "Line type", "Sets this value to specify the connection line type. Eg. Dashed."},
@@ -69,6 +70,7 @@
{"BOOLEAN_LIST", "roundCornerRect", "false", "Round rectangle corner enabled","Is rounding of rectangle corner feature enabled."},
{"STRING", "roundCornerRadius","9", "Round rectangle corner radius","Radius of round rectangle corner."},
{"STRING", "help", "", "Help URL", "Sets this value to specify the URL containig the help information belonging to the atom."},
+ {"MULTISTRING", "description", "", "Description", "Free format description of the model element for documentation purposes."},
{"COMPASS_OPTION", "namePosition", "4", "Name Location", "Sets the name label location relative to the atom icon. Eg. North."},
{"STRING", "nameWrap", "0", "NameWrap number", "Sets the number of characters in a line of the name. If it is 0, then wrapping is disabled."},
{"BOOLEAN_LIST", "isNameEnabled", "true", "Name enabled", "Displays the name."},
@@ -103,6 +105,7 @@
{"STRING", "roundCornerRadius","9", "Round rectangle corner radius", "Radius of round rectangle corner."},
{"COLOR", "portColor", "0x000000", "Port name color", "Port name color for the displayed ports of this model."},
{"STRING", "help", "", "Help URL", "Sets this value to specify the URL containig the help information belonging to the model."},
+ {"MULTISTRING", "description", "", "Description", "Free format description of the model element for documentation purposes."},
{"COMPASS_OPTION", "namePosition", "4", "Name Location", "Sets the name label location relative to the atom icon. Eg. North."},
{"STRING", "nameWrap", "0", "NameWrap number", "Sets the number of characters in a line of the name. If it is 0, then wrapping is disabled."},
{"BOOLEAN_LIST", "isNameEnabled", "true", "Name enabled", "Displays the name."},
@@ -138,6 +141,7 @@
{"BOOLEAN_LIST", "roundCornerRect", "false", "Round rectangle corner enabled", "Is rounding of rectangle corner feature enabled."},
{"STRING", "roundCornerRadius","9", "Round rectangle corner radius", "Radius of round rectangle corner."},
{"STRING", "help", "", "Help URL", "Sets this value to specify the URL containig the help information belonging to the proxy."},
+ {"MULTISTRING", "description", "", "Description", "Free format description of the model element for documentation purposes."},
{"COMPASS_OPTION", "namePosition", "4", "Name Location", "Sets the name label location relative to the proxy icon. Eg. North."},
{"STRING", "nameWrap", "0", "NameWrap number", "Sets the number of characters in a line of the name. If it is 0, then wrapping is disabled."},
{"BOOLEAN_LIST", "isNameEnabled", "true", "Name enabled", "Displays the name."},
@@ -170,6 +174,7 @@
{"BOOLEAN_LIST", "roundCornerRect", "false", "Round rectangle corner enabled","Is rounding of rectangle corner feature enabled."},
{"STRING", "roundCornerRadius","9", "Round rectangle corner radius","Radius of round rectangle corner."},
{"STRING", "help", "", "Help URL", "Sets this value to specify the URL containig the help information belonging to the set."},
+ {"MULTISTRING", "description", "", "Description", "Free format description of the model element for documentation purposes."},
{"COMPASS_OPTION", "namePosition", "4", "Name Location", "Sets the name label location relative to the set icon. Eg. North."},
{"STRING", "nameWrap", "0", "NameWrap number", "Sets the number of characters in a line of the name. If it is 0, then wrapping is disabled."},
{"BOOLEAN_LIST", "isNameEnabled", "true", "Name enabled", "Displays the name."},
@@ -792,6 +797,20 @@
ListItems.Add(ListItem);
}
+ else if(strEntryType=="MULTISTRING")
+ {
+ CStringArray strValueArray;
+ str_split(strValue, strValueArray);
+ ListItem.Value.SetStringValue(strValueArray,3);
+
+ CString strDefValue = (*pTableRow)[2];
+ CStringArray strDefValueArray;
+ str_split(strDefValue, strDefValueArray);
+ ListItem.DefValue.SetStringValue(strDefValueArray,3);
+
+ ListItems.Add(ListItem);
+ }
+
else if(strEntryType=="COMPASS_OPTION")
{
UINT uCompassValue= CCompassData::ParseMgaCompassValueOption(strValue);
More information about the gme-commit
mailing list