00001 00002 //---------------------------------------------------------------------------------------------------------------- 00003 // Class definition include 00004 //---------------------------------------------------------------------------------------------------------------- 00005 #include "NameWrapper.h" 00006 00007 //---------------------------------------------------------------------------------------------------------------- 00008 // Class implementation 00009 //---------------------------------------------------------------------------------------------------------------- 00012 //------------------------------------------------------------------------------------------------------------ 00013 // Constructors & Destructors 00014 //------------------------------------------------------------------------------------------------------------ 00015 00016 /* 00017 * Creates the NameWrapper 00018 * @param thekeyName The key name 00019 * @param theRealName The real name 00020 * @return Returns the created NameWrapper 00021 */ 00022 NameWrapper :: NameWrapper(std::string thekeyName, std::string theRealName) 00023 { 00024 setWrappingPair(thekeyName, theRealName); 00025 } 00026 00027 /* 00028 * Destroys the NameWrapper 00029 */ 00030 NameWrapper :: ~ NameWrapper() 00031 { 00032 00033 } 00034 00035 //------------------------------------------------------------------------------------------------------------ 00036 // Methods 00037 //------------------------------------------------------------------------------------------------------------ 00038 00039 /* 00040 * Sets the names pair to wrapp 00041 * @param thekeyName The key name 00042 * @param theRealName The real name 00043 */ 00044 void NameWrapper :: setWrappingPair(std::string thekeyName, std::string theRealName ) 00045 { 00046 realName = theRealName; 00047 keyName = thekeyName; 00048 } 00049 00050 /* 00051 * Gets the wrapped key name 00052 * @param keyName The key name 00053 */ 00054 std::string NameWrapper :: getKeyName() 00055 { 00056 return keyName; 00057 } 00058 00059 /* 00060 * Gets the wrapped real name 00061 * @param realName The real name 00062 */ 00063 std::string NameWrapper :: getRealName() 00064 { 00065 return realName; 00066 } 00067 00068