--- parser3/src/include/pa_string.h 2020/12/15 17:10:32 1.228 +++ parser3/src/include/pa_string.h 2024/03/14 03:17:01 1.232 @@ -1,14 +1,14 @@ /** @file Parser: string class decl. - Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian */ #ifndef PA_STRING_H #define PA_STRING_H -#define IDENT_PA_STRING_H "$Id: pa_string.h,v 1.228 2020/12/15 17:10:32 moko Exp $" +#define IDENT_PA_STRING_H "$Id: pa_string.h,v 1.232 2024/03/14 03:17:01 moko Exp $" // includes #include "pa_types.h" @@ -47,12 +47,31 @@ class SQL_Connection; class Dictionary; class Request_charsets; class String; -typedef Array ArrayString; class VRegex; +#ifdef NDEBUG +typedef Array ArrayString; +#else +class ArrayString : public Array { +public: + inline ArrayString(size_t initial=0) : Array(initial){ + } + inline Array& operator+=(element_type src) { + assert(src != NULL); + return Array::operator+=(src); + } + + inline element_type get(size_t index) const { + element_type result=Array::get(index); + assert(result != NULL); + return result; + } +}; +#endif + // generally useful -double pa_atod(const char* str, const String* problem_source=0); +double pa_atod(const char* str, const String* problem_source); int pa_atoi(const char* str, int base=10, const String* problem_source=0); unsigned int pa_atoui(const char *str, int base=10, const String* problem_source=0); uint64_t pa_atoul(const char *str, int base=10, const String* problem_source=0);