00001 #ifndef __KEY_THING__ 00002 #define __KEY_THING__ 00003 00004 00005 //------------------------------------------------------------------------------------------------------------ 00006 // Includes 00007 //------------------------------------------------------------------------------------------------------------ 00008 #include <iostream> 00009 #include <string> 00010 00011 class KeyThing{ 00012 00013 00014 //------------------------------------------------------------------------------------------------------------ 00015 // Constructors & Destructors 00016 //------------------------------------------------------------------------------------------------------------ 00017 public: 00018 00019 /* 00020 * Creates the key thing 00021 * @param thePrefix Is the prefix of the new keyThing for the key generation correponding to the new keyThing 00022 * @param theValue Is the value of the intial key generation correponding to the new keyThing 00023 */ 00024 KeyThing(std::string thePrefix, int theValue); 00025 00026 /* 00027 * Destroys the key thing 00028 */ 00029 ~KeyThing(); 00030 00031 00032 //------------------------------------------------------------------------------------------------------------ 00033 // Public Methods 00034 //------------------------------------------------------------------------------------------------------------ 00035 00036 /* 00037 * Sets the prefix of the keyThing 00038 */ 00039 void setPrefix( std::string aPrefix); 00040 00041 /* 00042 * Sets the value value of the keyThing 00043 * @param aValue The valueimum to set 00044 */ 00045 void setValue (int aValue); 00046 00047 /* 00048 * Gets the prefix of the keyThing 00049 * @return prefix The setted prefix 00050 */ 00051 std::string getPrefix(); 00052 00053 /* 00054 * Gets the value value of the keyThing 00055 * @return value The setted valueimum 00056 */ 00057 int getValue(); 00058 00059 //------------------------------------------------------------------------------------------------------------ 00060 // Constants 00061 //------------------------------------------------------------------------------------------------------------ 00062 00063 //------------------------------------------------------------------------------------------------------------ 00064 // Attributes 00065 //------------------------------------------------------------------------------------------------------------ 00066 00067 private: 00068 00069 /* 00070 * Represents the prefix of the keyThing 00071 */ 00072 std::string prefix; 00073 00074 /* 00075 * Represents the value value of the keyThing 00076 */ 00077 int value; 00078 }; 00079 #endif 00080