00001 /* 00002 * Copyright (c) 2010 Ferruccio Vitale <unixo@devzero.it> 00003 * All rights reserved. 00004 * 00005 * $Id: Category.h 72 2010-08-03 16:43:52Z 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 00017 class Category : public ManagedObject 00018 { 00019 public: 00020 Category(); 00021 static Category *categoryByID(int aCid); 00022 static Category *factory(string aValue); 00023 static vector<Category *> & catalog(); 00024 00025 string primaryKey(); 00026 string getName(); 00027 00028 friend ostream& operator<<(ostream &, Category &); 00029 }; 00030 00031 #endif /* __CATEGORY_H__ */