[commit] r2150 - in trunk: Doc GME/ConstraintManager
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Tue Feb 12 13:47:45 CST 2013
Author: ksmyth
Date: Tue Feb 12 13:47:45 2013
New Revision: 2150
Log:
OCL: add Enumeration::toString
Modified:
trunk/Doc/README_in.txt
trunk/GME/ConstraintManager/OCLTypeExBasic.cpp
trunk/GME/ConstraintManager/OCLTypeExBasic.h
trunk/GME/ConstraintManager/OCLTypeExGMECM.cpp
trunk/GME/ConstraintManager/OCLTypeExGMEEC.cpp
Modified: trunk/Doc/README_in.txt
==============================================================================
--- trunk/Doc/README_in.txt Tue Feb 12 13:47:10 2013 (r2149)
+++ trunk/Doc/README_in.txt Tue Feb 12 13:47:45 2013 (r2150)
@@ -26,6 +26,11 @@
1. Release Notes
************************************************
+Release Notes
+----------------------------------
+ - Fix MetaGME ExpressionChecker
+ - OCL: add toString() method to Enumeration
+
Release Notes of Release 13.1.24
----------------------------------
- Fix CSharpDSMLGenerator
Modified: trunk/GME/ConstraintManager/OCLTypeExBasic.cpp
==============================================================================
--- trunk/GME/ConstraintManager/OCLTypeExBasic.cpp Tue Feb 12 13:47:10 2013 (r2149)
+++ trunk/GME/ConstraintManager/OCLTypeExBasic.cpp Tue Feb 12 13:47:45 2013 (r2150)
@@ -336,6 +336,7 @@
if ( ( strName == "trim" && iCount == 0 ) ){
vecType.push_back( "ocl::String" );
vecFeatures.push_back( new OclMeta::Method( strName, vecParams, vecType, new TString_Trim(), false ) );
+ return;
}
}
@@ -345,6 +346,29 @@
//
//##############################################################################################################################################
+ METHOD( TEnumeration_ToString )
+ {
+ void operator()()
+ {
+ DECL_ENUMERATION( enumThis, GetThis() );
+ SetResult( CREATE_STRING( GetTypeManager(), enumThis ) );
+ }
+ };
+
+ void TEnumeration_MethodFactory::GetFeatures( const OclSignature::Method& signature, OclMeta::MethodVector& vecFeatures )
+ {
+ std::string strName = signature.GetName();
+ int iCount = signature.GetParameterCount();
+ FPV vecParams;
+ TS vecType;
+
+ if ( ( strName == "toString" ) && iCount == 0 ) {
+ vecType.push_back( "ocl::String" );
+ vecFeatures.push_back( new OclMeta::Method( strName, vecParams, vecType, new TEnumeration_ToString(), false ) );
+ return;
+ }
+ }
+
//##############################################################################################################################################
//
// T Y P E O F ocl::Boolean
@@ -3241,7 +3265,7 @@
if ( strName == "ocl::Enumeration" || strName == "enum" ) {
StringVector vecSupers;
vecSupers.push_back( "ocl::Any" );
- vecTypes.push_back(std::unique_ptr<OclMeta::Type>( new OclMeta::Type( "ocl::Enumeration", vecSupers, new OclImplementation::AttributeFactory(), new OclImplementation::AssociationFactory(), new OclImplementation::MethodFactory(), false ) ));
+ vecTypes.push_back(std::unique_ptr<OclMeta::Type>( new OclMeta::Type( "ocl::Enumeration", vecSupers, new OclImplementation::AttributeFactory(), new OclImplementation::AssociationFactory(), new TEnumeration_MethodFactory(), false ) ));
return;
}
Modified: trunk/GME/ConstraintManager/OCLTypeExBasic.h
==============================================================================
--- trunk/GME/ConstraintManager/OCLTypeExBasic.h Tue Feb 12 13:47:10 2013 (r2149)
+++ trunk/GME/ConstraintManager/OCLTypeExBasic.h Tue Feb 12 13:47:45 2013 (r2150)
@@ -49,6 +49,19 @@
virtual void GetFeatures( const OclSignature::Method& signature, OclMeta::MethodVector& vecFeatures );
};
+
+//##############################################################################################################################################
+//
+// T Y P E O F ocl::Enumeration
+//
+//##############################################################################################################################################
+ class TEnumeration_MethodFactory
+ : public OclImplementation::MethodFactory
+ {
+ public :
+ virtual void GetFeatures( const OclSignature::Method& signature, OclMeta::MethodVector& vecFeatures );
+ };
+
//##############################################################################################################################################
//
// T Y P E O F ocl::Real
@@ -64,7 +77,7 @@
//##############################################################################################################################################
//
-// T Y P E O F ocl::Real
+// T Y P E O F ocl::Integer
//
//##############################################################################################################################################
@@ -164,7 +177,7 @@
//##############################################################################################################################################
//
-// T Y P E O F ocl::OerderedSet
+// T Y P E O F ocl::OrderedSet
//
//##############################################################################################################################################
Modified: trunk/GME/ConstraintManager/OCLTypeExGMECM.cpp
==============================================================================
--- trunk/GME/ConstraintManager/OCLTypeExGMECM.cpp Tue Feb 12 13:47:10 2013 (r2149)
+++ trunk/GME/ConstraintManager/OCLTypeExGMECM.cpp Tue Feb 12 13:47:45 2013 (r2150)
@@ -2263,7 +2263,7 @@
if ( strName == "ocl::Enumeration" || strName == "enum" ) {
StringVector vecSupers;
vecSupers.push_back( "ocl::Any" );
- vecTypes.push_back(unique_ptr<OclMeta::Type>( new OclMeta::Type( "ocl::Enumeration", vecSupers, new OclImplementation::AttributeFactory(), new OclImplementation::AssociationFactory(), new OclImplementation::MethodFactory(), false ) ));
+ vecTypes.push_back(unique_ptr<OclMeta::Type>( new OclMeta::Type( "ocl::Enumeration", vecSupers, new OclImplementation::AttributeFactory(), new OclImplementation::AssociationFactory(), new OclBasic::TEnumeration_MethodFactory(), false ) ));
return;
}
Modified: trunk/GME/ConstraintManager/OCLTypeExGMEEC.cpp
==============================================================================
--- trunk/GME/ConstraintManager/OCLTypeExGMEEC.cpp Tue Feb 12 13:47:10 2013 (r2149)
+++ trunk/GME/ConstraintManager/OCLTypeExGMEEC.cpp Tue Feb 12 13:47:45 2013 (r2150)
@@ -965,7 +965,7 @@
if ( strName == "ocl::Enumeration" || strName == "enum" ) {
StringVector vecSupers;
vecSupers.push_back( "ocl::Any" );
- vecTypes.push_back(std::unique_ptr<OclMeta::Type>( new OclMeta::Type( "ocl::Enumeration", vecSupers, new OclImplementation::AttributeFactory(), new OclImplementation::AssociationFactory(), new OclImplementation::MethodFactory(), false ) ));
+ vecTypes.push_back(std::unique_ptr<OclMeta::Type>( new OclMeta::Type( "ocl::Enumeration", vecSupers, new OclImplementation::AttributeFactory(), new OclImplementation::AssociationFactory(), new OclBasic::TEnumeration_MethodFactory(), false ) ));
return;
}
More information about the gme-commit
mailing list