[asterisk-scf-commits] asterisk-scf/release/slice-plugins.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Feb 18 14:40:15 CST 2011


branch "master" has been updated
       via  70181d456c77ca222ba1202fccfda7cbce2ab99f (commit)
      from  e7f71fc1ca973439cd1fc336ac4709db49403ab6 (commit)

Summary of changes:
 src/SliceVisitorPattern.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 70181d456c77ca222ba1202fccfda7cbce2ab99f
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Feb 18 14:39:34 2011 -0600

    Allow 'visitor' metadata to refer to visitor classes using relative (not fully
    scoped names).

diff --git a/src/SliceVisitorPattern.cpp b/src/SliceVisitorPattern.cpp
index 1d28767..2998f04 100644
--- a/src/SliceVisitorPattern.cpp
+++ b/src/SliceVisitorPattern.cpp
@@ -155,6 +155,12 @@ VisitorPatternVisitor::visitClassDefStart(const ClassDefPtr& p)
 				// visiting classes.
 				const string visitor = (*q).substr(8);
 				map<string, ClassDefPtr>::const_iterator it = _visitorClasses.find(visitor);
+				// If it wasn't found, try prefixing it with the container that this class
+				// is located in
+				if(it == _visitorClasses.end())
+				{
+					it = _visitorClasses.find(p->container()->thisScope() + visitor);
+				}
 				if(it != _visitorClasses.end())
 				{
 					// Initially, assume the base visitor class will be the specified class.

-----------------------------------------------------------------------


-- 
asterisk-scf/release/slice-plugins.git



More information about the asterisk-scf-commits mailing list