00001 /* 00002 * Copyright (c) 2010 Ferruccio Vitale <unixo@devzero.it> 00003 * All rights reserved. 00004 * 00005 * $Id: Category.h 75 2010-09-13 09:25:53Z unixo $ 00006 */ 00007 00008 #ifndef __CATEGORY_H__ 00009 #define __CATEGORY_H__ 00010 00011 #include "common.h" 00012 #include "ManagedObject.h" 00013 00014 using namespace std; 00015 using namespace mysqlpp; 00016 00025 class Category : public ManagedObject 00026 { 00027 public: 00028 Category(); 00029 static Category *categoryByID(int aCid); 00030 static Category *factory(string aValue); 00031 static vector<Category *> & catalog(); 00032 00033 string primaryKey(); 00034 string getName(); 00035 00036 friend ostream& operator<<(ostream &, Category &); 00037 }; 00038 00039 #endif /* __CATEGORY_H__ */