2 * Copyright (C) ARM Limited 2013-2015. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
17 DynBuf() : capacity(0), length(0), buf(NULL) {}
31 bool read(const char *const path);
32 // On error instead of printing the error and returning false, this returns -errno
33 int readlink(const char *const path);
34 __attribute__ ((format(printf, 2, 3)))
35 bool printf(const char *format, ...);
36 __attribute__ ((format(printf, 2, 3)))
37 bool append(const char *format, ...);
38 bool append(const char *format, va_list ap);
39 bool appendStr(const char *str);
41 size_t getLength() const { return length; }
42 const char *getBuf() const { return buf; }
43 char *getBuf() { return buf; }
46 int resize(const size_t minCapacity);
52 // Intentionally undefined
53 DynBuf(const DynBuf &);
54 DynBuf &operator=(const DynBuf &);