/* Copyright (C) 2006 Parallel Realities This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ class Properties : public Linkable { private: Hashtable table; Data *findProperty(char *key); public: String name; Properties(); ~Properties(); void operator +=(Properties *properties); void setName(char *name); char *getName(); int getSize(); bool hasProperty(char *key); void setProperty(char *key, char *value); void setProperty(char *key, int value); void setProperty(char *key, long value); void setProperty(char *key, unsigned int value); void setProperty(char *key, float value); void setProperty(char *key, double value); void setProperty(char *key, Vector v); void setProperty(char *key, GLColor c); void alterProperty(char *key, double value); char *getString(char *key, char *defaultValue); float getFloat(char *key, float defaultValue); int getInt(char *key, int defaultValue); Vector getVector(char *key); Vector getVector(char *key, Vector defaultValue); GLColor getColor(char *key); void removeProperty(char *key); void removeProperties(char *key); void clear(); Hashtable *getTable(); void save(FILE *fp); void listProperties(); };