Use provided names for CountedObject instead of typeid()

This commit is contained in:
Vinnie Falco
2013-06-26 00:17:09 -07:00
parent 59b2824d46
commit fe15cfbf31
21 changed files with 47 additions and 0 deletions

View File

@@ -101,6 +101,8 @@ public:
getCounter ().decrement ();
}
virtual char const* getCountedObjectName () = 0;
private:
class Counter : public CountedObjects::CounterBase
{

View File

@@ -12,6 +12,8 @@ class STObject
, public CountedObject <STObject>
{
public:
char const* getCountedObjectName () { return "STObject"; }
STObject () : mType (NULL)
{
;
@@ -323,6 +325,8 @@ class STArray
, public CountedObject <STArray>
{
public:
char const* getCountedObjectName () { return "STArray"; }
typedef boost::ptr_vector<STObject> vector;
typedef boost::ptr_vector<STObject>::iterator iterator;
typedef boost::ptr_vector<STObject>::const_iterator const_iterator;