2 * Copyright (C) ARM Limited 2013-2014. 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.
16 DynBuf() : capacity(0), length(0), buf(NULL) {}
30 bool read(const char *const path);
31 // On error instead of printing the error and returning false, this returns -errno
32 int readlink(const char *const path);
33 __attribute__ ((format(printf, 2, 3)))
34 bool printf(const char *format, ...);
36 size_t getLength() const { return length; }
37 const char *getBuf() const { return buf; }
38 char *getBuf() { return buf; }
41 int resize(const size_t minCapacity);
47 // Intentionally undefined
48 DynBuf(const DynBuf &);
49 DynBuf &operator=(const DynBuf &);