Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

utils.h

Go to the documentation of this file.
00001 #ifndef  EDG_WORKLOAD_COMMON_UTILITIES_UTILS_H
00002 #define EDG_WORKLOAD_COMMON_UTILITIES_UTILS_H
00003 /*
00004  * utils.h
00005  * Copyright (c) 2001 The European Datagrid Project - IST programme, all rights reserved.
00006  * Contributors are mentioned in the code where appropriate.
00007  *
00008  */
00009 #ifdef HAVE_CONFIG_H
00010 #include <config.h>
00011 #endif
00012 #include "edg/workload/common/common_namespace.h"
00013 #ifdef HAVE_STRINGSTREAM
00014 #include <sstream>
00015 #else
00016 #include <strstream>
00017 #endif
00018 
00019 #include <iostream>
00020 #include <vector>
00021 #include <string>
00022 #include <cstdlib>
00023 #include <cstdio>
00024 #include <ctime>
00025 #include <unistd.h>
00026 
00027 
00028 
00029 #define  CHAR_BUFFER_SIZE 1024
00030 
00031 COMMON_NAMESPACE_BEGIN{
00032      namespace utilities {
00046 int isInt (const std::string& str);
00051 int toInt (const std::string& str, int &sum);
00056 int toHex (const std::string& str, int &sum);
00061 std::string inTo(int i);
00066 int count(const std::string& strMain, const std::string& sep);
00075 std::vector<std::string> split(const std::string& str, const std::string& sep, int maxLength =1000, int trough = 0);
00076 std::string sp(const std::string& separator);
00077 int checkFormat (const std::string& format, const std::string& str);
00078 
00079 void
00080 replace(std::string& where, const std::string& what, const std::string& with);
00081 
00082 //EWC_END_NAMESPACE ;// End NameSpace Definition
00083 } COMMON_NAMESPACE_END
00084    }
00085 #endif

Generated on Wed Mar 1 00:37:55 2006 for COMMON API - configuration, jobid, ldif2classadi, logger, process, requestad, socket++i, task, utilities by doxygen 1.3.5