00001 // mortic - A game engine for the Expanses of Naryan. 00002 // Copyright (C) 2007 Aaron Griffith 00003 // This file is under the LGPL. See mortic.h for more information. 00004 00006 // _ _ _ _ _ _ _ _ // 00007 // | | | | | (_) (_) | (_) // 00008 // | | | | |_ _| |_| |_ _ ___ ___ // 00009 // | | | | __| | | | __| |/ _ / __| // 00010 // | |__| | |_| | | | |_| | __\__ \ // 00011 // \____/ \__|_|_|_|\__|_|\___|___/ // 00012 // // 00013 // // 00014 // utilities.h - Interface of Utilities // 00016 00017 #include <stdlib.h> 00018 #include <string> 00019 00020 #ifndef __IUtilities_h_INCLUDED__ 00021 #define __IUtilities_h_INCLUDED__ 00022 00023 #ifndef __utilities_h_extern__ 00024 #define __utilities_h_extern__ extern 00025 #endif 00026 00027 namespace mortic 00028 { 00030 00033 namespace utilities 00034 { 00035 // awesome simple hash function from www.partow.net 00036 // all credit to them. Under the Common Public License 00037 // http://www.opensource.org/licenses/cpl.php 00039 00049 __utilities_h_extern__ unsigned int hash(const std::string& str); 00050 00051 /* ========================================================================== */ 00052 /* */ 00053 /* itoa.h */ 00054 /* (c) 2006 Priyadarsan */ 00055 /* */ 00056 /* a program to convert integer to string */ 00057 /* (Original Code: http://www.freebookzone.com/others/itoa.h) */ 00058 /* Ex. usage file available at http://www.freebookzone.com/others/itoa.c */ 00059 /* */ 00060 /* ========================================================================== */ 00061 00063 00069 __utilities_h_extern__ std::string itoa(int n); 00070 }; // namespace utilities 00071 00072 } 00073 ; // namespace mortic 00074 #endif // __IUtilities_h_INCLUDED__