Changeset 112:d3ff76c4a237 in rrlib_rtti


Ignore:
Timestamp:
28.01.2019 12:27:21 (9 months ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Phase:
public
Message:

Adds AddName method to tStaticTypeRegistration - to add names to data types that should retain their default names as default

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tStaticTypeRegistration.cpp

    r97 r112  
    8787} 
    8888 
     89tStaticTypeRegistration& tStaticTypeRegistration::AddName(const char* legacy_name) 
     90{ 
     91  if (Register().empty() || Register().back().types.empty()) 
     92  { 
     93    throw std::runtime_error("Type must be added first"); 
     94  } 
     95  Register().back().types.back().AddName(legacy_name); 
     96  return *this; 
     97} 
     98 
    8999const char* tStaticTypeRegistration::GetTypeRegistrationSharedLibrary(const tType& type) 
    90100{ 
  • tStaticTypeRegistration.h

    r105 r112  
    119119  } 
    120120 
     121  /*! 
     122   * Adds custom/legacy name to last registered type. 
     123   * If no type was registered yet, throws exception. 
     124   * 
     125   * \param legacy_name Secondary custom name (typically legacy name) 
     126   */ 
     127  tStaticTypeRegistration& AddName(const char* legacy_name); 
     128 
     129 
    121130  static const char* GetTypeRegistrationSharedLibrary(const tType& type); 
    122131 
Note: See TracChangeset for help on using the changeset viewer.