summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Handle.h4
-rw-r--r--include/Makefile.am4
-rw-r--r--include/String.h60
-rw-r--r--include/Task.h0
-rw-r--r--include/Variables.h8
5 files changed, 44 insertions, 32 deletions
diff --git a/include/Handle.h b/include/Handle.h
index cec51c7..0044fa6 100644
--- a/include/Handle.h
+++ b/include/Handle.h
@@ -31,6 +31,8 @@ class Handle : public Base {
ssize_t read(void *buf, size_t count) throw (IOException);
ssize_t write(const void *buf, size_t count) throw (IOException);
bool IsClosed(void);
+ bool IsNonBlock(void);
+ void SetNonBlock(void);
virtual bool CanRead() = 0;
virtual bool CanWrite() = 0;
virtual String GetName() = 0;
@@ -39,7 +41,7 @@ class Handle : public Base {
int GetHandle();
private:
int h;
- bool closed;
+ bool closed, nonblock;
};
Handle & operator<<(Handle &, const String &);
diff --git a/include/Makefile.am b/include/Makefile.am
index ca7f866..6109711 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,2 +1,4 @@
-include_HEADERS = Exceptions.h Handle.h String.h Output.h Socket.h HttpServ.h Variables.h Menu.h Action.h Message.h Form.h Confirm.h Table.h IRC.h
+include_HEADERS = \
+Exceptions.h Handle.h String.h Output.h Socket.h HttpServ.h Variables.h Menu.h \
+Action.h Message.h Form.h Confirm.h Table.h IRC.h Task.h
diff --git a/include/String.h b/include/String.h
index 65bf0ac..463abfc 100644
--- a/include/String.h
+++ b/include/String.h
@@ -47,37 +47,41 @@ class String : public Base {
String(int);
String(double);
~String();
- char * set(char *, ...);
- char * to_charp(size_t = 0, ssize_t = -1) const;
- int to_int() const;
- double to_double() const;
- String to_sqldate() const;
- String to_sqltime() const;
- String from_sqldate() const;
- String from_sqltime() const;
- double datedif(const String &) const;
- bool is_date() const;
- bool is_number() const;
- bool is_float() const;
- bool is_time() const;
- size_t strlen() const;
- ssize_t strchr(char, size_t = 0) const;
- ssize_t strrchr(char) const;
- ssize_t strstr(const String &) const;
- int strchrcnt(char) const;
- String & operator=(const String &);
- String operator+(const String &) const;
- String & operator+=(const String &);
- bool operator!=(const String &) const;
- bool operator==(const String &) const;
- bool operator<=(const String &) const;
- bool operator>=(const String &) const;
- bool operator<(const String &) const;
- bool operator>(const String &) const;
- char operator[](size_t i) const;
+ char * set(char *, ...);
+ char * to_charp(size_t = 0, ssize_t = -1) const;
+ String extract(size_t = 0, ssize_t = -1) const;
+ char * strdup(size_t = 0, ssize_t = -1) const;
+ int to_int() const;
+ double to_double() const;
+ String to_sqldate() const;
+ String to_sqltime() const;
+ String from_sqldate() const;
+ String from_sqltime() const;
+ double datedif(const String &) const;
+ bool is_date() const;
+ bool is_number() const;
+ bool is_float() const;
+ bool is_time() const;
+ size_t strlen() const;
+ ssize_t strchr(char, size_t = 0) const;
+ ssize_t strrchr(char) const;
+ ssize_t strstr(const String &) const;
+ int strchrcnt(char) const;
+ String & operator=(const String &);
+ String operator+(const String &) const;
+ String & operator+=(const String &);
+ bool operator!=(const String &) const;
+ bool operator==(const String &) const;
+ bool operator<=(const String &) const;
+ bool operator>=(const String &) const;
+ bool operator<(const String &) const;
+ bool operator>(const String &) const;
+ char operator[](size_t i) const;
private:
+ String(int hs, const char *);
static char t[BUFSIZ];
char * str;
+ size_t siz;
};
ostream & operator<<(ostream &, const String &);
diff --git a/include/Task.h b/include/Task.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/Task.h
diff --git a/include/Variables.h b/include/Variables.h
index 955cf62..ffaf98e 100644
--- a/include/Variables.h
+++ b/include/Variables.h
@@ -2,6 +2,7 @@
#define __VARIABLES_H__
#ifdef __cplusplus
+#include <vector>
#include "Exceptions.h"
#include "String.h"
#include "Handle.h"
@@ -28,15 +29,18 @@
class Variables : public Base {
public:
- Variables(int);
+ Variables(int = 0);
~Variables();
void SetTo(int i, const String &);
String operator[](const String &);
String operator[](int i);
void Dump(Handle *);
int GetNb();
+ void Add(const String &);
+ void Del(int);
+ void Del(const String &);
private:
- String * Vars;
+ vector<String> Vars;
int nbvars;
};