aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bufferarray.h
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-03-01 00:22:23 +0000
committerFritz Elfert <felfert@to.com>2001-03-01 00:22:23 +0000
commit75007da068aac10fed90fc5234ab2d50deed3e61 (patch)
treebe0a8ebba9bad4ccab4600c60d9e7fcc21dc7837 /lib/bufferarray.h
parentd8ae774198cf180fcaa4a2512dd94b4dbfdfd72d (diff)
downloadplptools-75007da068aac10fed90fc5234ab2d50deed3e61.tar.gz
plptools-75007da068aac10fed90fc5234ab2d50deed3e61.tar.bz2
plptools-75007da068aac10fed90fc5234ab2d50deed3e61.zip
Modified icons.
Started NLS support. Added kpsion KDE2 application. Unified file-headers.
Diffstat (limited to 'lib/bufferarray.h')
-rw-r--r--lib/bufferarray.h289
1 files changed, 159 insertions, 130 deletions
diff --git a/lib/bufferarray.h b/lib/bufferarray.h
index 358d428..59554e3 100644
--- a/lib/bufferarray.h
+++ b/lib/bufferarray.h
@@ -1,5 +1,28 @@
-#ifndef _bufferarray_h
-#define _bufferarray_h
+/*-*-c++-*-
+ * $Id$
+ *
+ * This file is part of plptools.
+ *
+ * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com>
+ * Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _BUFFERARRAY_H_
+#define _BUFFERARRAY_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -11,138 +34,144 @@ class bufferStore;
*/
class bufferArray {
public:
- /**
- * constructs a new bufferArray.
- * A minimum of @ref ALLOC_MIN
- * elements is allocated.
- */
- bufferArray();
-
- /**
- * Constructs a new bufferArray.
- *
- * @param a The initial contents for this array.
- */
- bufferArray(const bufferArray &a);
-
- /**
- * Destroys the bufferArray.
- */
- ~bufferArray();
-
- /**
- * Copys the bufferArray.
- */
- bufferArray &operator =(const bufferArray &a);
-
- /**
- * Checks if this bufferArray is empty.
- *
- * @return true if the bufferArray is empty.
- */
- bool empty() const;
-
- /**
- * Retrieves the bufferStore at given index.
- *
- * @return The bufferStore at index.
- */
- bufferStore &operator [](const unsigned long index);
-
- /**
- * Appends a bufferStore to a bufferArray.
- *
- * @param s The bufferStore to be appended.
- *
- * @returns A new bufferArray with bufferStore appended to.
- */
- bufferArray operator +(const bufferStore &s);
-
- /**
- * Concatenates two bufferArrays.
- *
- * @param a The bufferArray to be appended.
- *
- * @returns A new bufferArray consisting with a appended.
- */
- bufferArray operator +(const bufferArray &a);
-
- /**
- * Appends a bufferStore to current instance.
- *
- * @param s The bufferStore to append.
- *
- * @returns A reference to the current instance with s appended.
- */
- bufferArray &operator +=(const bufferStore &s);
-
- /**
- * Appends a bufferArray to current instance.
- *
- * @param a The bufferArray to append.
- *
- * @returns A reference to the current instance with a appended.
- */
- bufferArray &operator +=(const bufferArray &a);
-
- /**
- * Removes the first bufferStore.
- *
- * @return The removed bufferStore.
- */
- bufferStore pop(void);
-
- /**
- * Inserts a bufferStore at index 0.
- *
- * @param b The bufferStore to be inserted.
- */
- void push(const bufferStore& b);
-
- /**
- * Appends a bufferStore.
- *
- * @param b The bufferStore to be appended.
- */
- void append(const bufferStore& b);
-
- /**
- * Evaluates the current length.
- *
- * @return The current number of bufferStores
- */
- long length(void);
-
- /**
- * Empties the bufferArray.
- */
- void clear(void);
+ /**
+ * constructs a new bufferArray.
+ * A minimum of @ref ALLOC_MIN
+ * elements is allocated.
+ */
+ bufferArray();
+
+ /**
+ * Constructs a new bufferArray.
+ *
+ * @param a The initial contents for this array.
+ */
+ bufferArray(const bufferArray &a);
+
+ /**
+ * Destroys the bufferArray.
+ */
+ ~bufferArray();
+
+ /**
+ * Copys the bufferArray.
+ */
+ bufferArray &operator =(const bufferArray &a);
+
+ /**
+ * Checks if this bufferArray is empty.
+ *
+ * @return true if the bufferArray is empty.
+ */
+ bool empty() const;
+
+ /**
+ * Retrieves the bufferStore at given index.
+ *
+ * @return The bufferStore at index.
+ */
+ bufferStore &operator [](const unsigned long index);
+
+ /**
+ * Appends a bufferStore to a bufferArray.
+ *
+ * @param s The bufferStore to be appended.
+ *
+ * @returns A new bufferArray with bufferStore appended to.
+ */
+ bufferArray operator +(const bufferStore &s);
+
+ /**
+ * Concatenates two bufferArrays.
+ *
+ * @param a The bufferArray to be appended.
+ *
+ * @returns A new bufferArray consisting with a appended.
+ */
+ bufferArray operator +(const bufferArray &a);
+
+ /**
+ * Appends a bufferStore to current instance.
+ *
+ * @param s The bufferStore to append.
+ *
+ * @returns A reference to the current instance with s appended.
+ */
+ bufferArray &operator +=(const bufferStore &s);
+
+ /**
+ * Appends a bufferArray to current instance.
+ *
+ * @param a The bufferArray to append.
+ *
+ * @returns A reference to the current instance with a appended.
+ */
+ bufferArray &operator +=(const bufferArray &a);
+
+ /**
+ * Removes the first bufferStore.
+ *
+ * @return The removed bufferStore.
+ */
+ bufferStore pop(void);
+
+ /**
+ * Inserts a bufferStore at index 0.
+ *
+ * @param b The bufferStore to be inserted.
+ */
+ void push(const bufferStore& b);
+
+ /**
+ * Appends a bufferStore.
+ *
+ * @param b The bufferStore to be appended.
+ */
+ void append(const bufferStore& b);
+
+ /**
+ * Evaluates the current length.
+ *
+ * @return The current number of bufferStores
+ */
+ long length(void);
+
+ /**
+ * Empties the bufferArray.
+ */
+ void clear(void);
private:
- /**
- * Minimum number of bufferStores to
- * allocate.
- */
- static const long ALLOC_MIN = 5;
-
- /**
- * The current number of bufferStores in
- * this bufferArray.
- */
- long len;
-
- /**
- * The current number of bufferStores
- * allocated.
- */
- long lenAllocd;
-
- /**
- * The content.
- */
- bufferStore* buff;
+ /**
+ * Minimum number of bufferStores to
+ * allocate.
+ */
+ static const long ALLOC_MIN = 5;
+
+ /**
+ * The current number of bufferStores in
+ * this bufferArray.
+ */
+ long len;
+
+ /**
+ * The current number of bufferStores
+ * allocated.
+ */
+ long lenAllocd;
+
+ /**
+ * The content.
+ */
+ bufferStore* buff;
};
inline bool bufferArray::empty() const { return len == 0; }
#endif
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * End:
+ */