00001 00002 //---------------------------------------------------------------------------------------------------------------- 00003 // Class definition include 00004 //---------------------------------------------------------------------------------------------------------------- 00005 #include "KeyThing.h" 00006 00007 00008 //---------------------------------------------------------------------------------------------------------------- 00009 // Class implementation 00010 //---------------------------------------------------------------------------------------------------------------- 00014 /* 00015 * Creates the key thing 00016 * @param thePrefix Is the prefix of the new keyThing for the key generation correponding to the new keyThing 00017 * @param theValue Is the value of the intial key generation correponding to the new keyThing 00018 */ 00019 KeyThing :: KeyThing(std::string thePrefix, int theValue) 00020 { 00021 setPrefix( thePrefix ); 00022 setValue( theValue ); 00023 } 00024 00025 /* 00026 * Destroys the key thing 00027 */ 00028 KeyThing :: ~KeyThing() 00029 { 00030 00031 } 00032 00033 00034 //------------------------------------------------------------------------------------------------------------ 00035 // Public Methods 00036 //------------------------------------------------------------------------------------------------------------ 00037 00038 /* 00039 * Sets the prefix of the keyThing 00040 */ 00041 void KeyThing :: setPrefix( std::string aPrefix) 00042 { 00043 prefix = aPrefix; 00044 } 00045 00046 /* 00047 * Sets the value value of the keyThing 00048 * @param aValue The valueimum to set 00049 */ 00050 void KeyThing :: setValue (int aValue) 00051 { 00052 value = aValue; 00053 } 00054 00055 /* 00056 * Gets the prefix of the keyThing 00057 * @return prefix The setted prefix 00058 */ 00059 std::string KeyThing :: getPrefix() 00060 { 00061 return prefix; 00062 } 00063 00064 /* 00065 * Gets the value value of the keyThing 00066 * @return value The setted valueimum 00067 */ 00068 int KeyThing :: getValue() 00069 { 00070 return value; 00071 } 00072 00073