]> rtime.felk.cvut.cz Git - boost-statechart-viewer.git/commitdiff
Visualization of states
authorPetr Silhavik <silhavik.p@gmail.com>
Tue, 11 Dec 2012 20:41:12 +0000 (21:41 +0100)
committerPetr Silhavik <silhavik.p@gmail.com>
Tue, 11 Dec 2012 20:41:12 +0000 (21:41 +0100)
Fix problem in visualization when using base states with timers. Now these states are ignored.

src/visualizer.cpp

index a18b4c12caa543f77d59ebc77946e19ae6229d95..d244a1af524d8d2924605e271f3075b5c3797ddc 100644 (file)
@@ -443,6 +443,7 @@ public:
 
        IdentifierInfo& II = ASTCtx->Idents.get("reactions");
        // TODO: Lookup for reactions even in base classes - probably by using Sema::LookupQualifiedName()
+       // TODO: Find when state has no reactions
        for (DeclContext::lookup_result Reactions = RecordDecl->lookup(DeclarationName(&II));
             Reactions.first != Reactions.second; ++Reactions.first)
            HandleReaction(*Reactions.first, RecordDecl);
@@ -465,6 +466,11 @@ public:
            return true;
        if (Declaration->getQualifiedNameAsString() == "boost::statechart::state")
            return true; // This is an "abstract class" not a real state
+       if (Declaration->getQualifiedNameAsString() == "TimedState")
+           return true; // This is an "abstract class" not a real state
+       if (Declaration->getQualifiedNameAsString() == "TimedSimpleState")
+           return true; // This is an "abstract class" not a real state
+
 
        MyCXXRecordDecl *RecordDecl = static_cast<MyCXXRecordDecl*>(Declaration);
        const CXXBaseSpecifier *Base;