#ifndef _PRODUCT_H #define _PRODUCT_H #include "DBEntity.h" //actual concrete classes entity types (sub-classes) class Product: public DBEntity { const char *m_company; friend class TIPsDatabase; public: //when created from the Entity load @ startup Product(TIPsDatabase *_db, const char *_name, const bool _commonword, const unsigned int _id): DBEntity(_db, _name, _commonword, _id) {} //when created from the ObjectParser on www.reviewcentre.com: Product(TIPsDatabase *_db, const InternetResource *_ir, const char *_name, const char *_company): DBEntity(_db, _ir, _name), m_company(strdupCheck(_company)) {} ~Product() { if (m_company) free((void*) m_company); } void addToDB(); }; #endif