#ifndef _DBENTITY_H #define _DBENTITY_H #include "DBObject.h" //Entities are physical named items: Products, Companies, etc. //as oppossed to Articles *about* those entities (see below) //Every entity has a table with the same name + other table(s) to describe it //these objects are also loaded by the entity list as well as created to be written back to the DB class DBEntity: public DBObject { vector m_names; const char *m_name; const bool m_commonword; const size_t m_nameLength; size_t parseName(); friend class TIPsDatabase; public: DBEntity(TIPsDatabase *_db, const char *_name, const bool _commonword, const unsigned int _id); DBEntity(TIPsDatabase *_db, const InternetResource *_ir, const char *_name); virtual ~DBEntity(); const char *firstname() const {return m_names[0];} const char *name() const {return m_name;} size_t nameLength() const {return m_nameLength;} bool commonword() const {return m_commonword;} }; #endif