|
From: <cn...@us...> - 2009-06-23 04:55:22
|
Revision: 363
http://hgengine.svn.sourceforge.net/hgengine/?rev=363&view=rev
Author: cnlohr
Date: 2009-06-23 04:55:17 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
add "GetType()" to get the string name of the class on hand.
Modified Paths:
--------------
Mercury2/src/MercuryNode.h
Modified: Mercury2/src/MercuryNode.h
===================================================================
--- Mercury2/src/MercuryNode.h 2009-06-23 04:54:38 UTC (rev 362)
+++ Mercury2/src/MercuryNode.h 2009-06-23 04:55:17 UTC (rev 363)
@@ -17,7 +17,8 @@
#define GENRTTI(x) static const x* Cast(const MercuryNode* n) \
{ if (n==NULL) return NULL; return dynamic_cast<const x*>(n); } \
static x* Cast(MercuryNode* n) \
-{ if (n==NULL) return NULL; return dynamic_cast<x*>(n); }
+{ if (n==NULL) return NULL; return dynamic_cast<x*>(n); } \
+static const char * GetType() { return #x; }
/*
#define GENRTTI(x) static bool IsMyType(const MercuryNode* n) \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|