Planeshift
stringarray.h
Go to the documentation of this file.
1 /*
2  * stringarray.h
3  *
4  * Copyright (C) 2007 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation (version 2 of the License)
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16  *
17  */
18 
19 #ifndef PS_STRINGARRAY_H
20 #define PS_STRINGARRAY_H
21 
22 #include <stdarg.h>
23 #include <csutil/stringarray.h>
24 
33 class psStringArray : public csStringArray
34 {
35 public:
40  size_t FormatPush(char const * fmt, ...)
41  {
42  csString str;
43  va_list args;
44  va_start(args, fmt);
45  str.FormatV(fmt, args);
46  va_end(args);
47  return Push(str);
48  }
49 };
50 
53 #endif // PS_STRINGARRAY_H
size_t FormatPush(char const *fmt,...)
Push a printf-style string onto the list (makes copy of string after formatting). ...
Definition: stringarray.h:40
A slightly improved version of csStringArray, sporting the handy FormatPush method.
Definition: stringarray.h:33