- NamedEntity(EntityKeyValues& entity) : m_entity(entity)
- {
- }
- const char* name() const
- {
- if(string_empty(m_name.c_str()))
- {
- return m_entity.getEntityClass().name();
- }
- return m_name.c_str();
- }
- void attach(const NameCallback& callback)
- {
- m_changed.insert(callback);
- }
- void detach(const NameCallback& callback)
- {
- m_changed.erase(callback);
- }
+NamedEntity( EntityKeyValues& entity ) : m_entity( entity ){
+}
+const char* name() const {
+ if ( string_empty( m_name.c_str() ) ) {
+ return m_entity.getEntityClass().name();
+ }
+ return m_name.c_str();
+}
+void attach( const NameCallback& callback ){
+ m_changed.insert( callback );
+}
+void detach( const NameCallback& callback ){
+ m_changed.erase( callback );
+}