/[svn]/libgig/trunk/src/Serialization.cpp
ViewVC logotype

Diff of /libgig/trunk/src/Serialization.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3172 by schoenebeck, Wed May 10 21:17:10 2017 UTC revision 3173 by schoenebeck, Wed May 10 23:07:28 2017 UTC
# Line 27  Line 27 
27  #include <assert.h>  #include <assert.h>
28  #include <string.h> // for memcpy()  #include <string.h> // for memcpy()
29  #include <stdlib.h> // for atof()  #include <stdlib.h> // for atof()
30    #include <cxxabi.h>
31    
32  #include "helper.h"  #include "helper.h"
33    
# Line 127  namespace Serialization { Line 128  namespace Serialization {
128      }      }
129    
130      String DataType::asLongDescr() const {      String DataType::asLongDescr() const {
         //TODO: Demangling of C++ raw type names  
131          String s = m_baseTypeName;          String s = m_baseTypeName;
132          if (!m_customTypeName.empty())          if (!m_customTypeName.empty())
133              s += " " + m_customTypeName;              s += " " + customTypeName(true);
134          if (isPointer())          if (isPointer())
135              s += " pointer";              s += " pointer";
136          return s;          return s;
137      }      }
138    
139        String DataType::customTypeName(bool demangle) const {
140            if (!demangle) return m_customTypeName;
141            int status;
142            const char* result =
143                abi::__cxa_demangle(m_customTypeName.c_str(), 0, 0, &status);
144            return (status == 0) ? result : m_customTypeName;
145        }
146    
147      // *************** Member ***************      // *************** Member ***************
148      // *      // *
149    

Legend:
Removed from v.3172  
changed lines
  Added in v.3173

  ViewVC Help
Powered by ViewVC