Componentize component_updater: Copy over test data with executable bit.
[chromium-blink-merge.git] / ppapi / native_client / src / untrusted / nacl_ppapi_util / string_buffer.h
blob028e33030d4c887d1220a029da5a5e1740b5c0ed
1 /*
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
7 #ifndef NATIVE_CLIENT_TESTS_MANIFEST_FILE_STRING_BUFFER_H_
8 #define NATIVE_CLIENT_TESTS_MANIFEST_FILE_STRING_BUFFER_H_
10 #include <string>
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <inttypes.h>
16 namespace nacl {
18 class StringBuffer {
19 public:
20 StringBuffer();
21 ~StringBuffer();
22 void DiscardOutput();
23 void Printf(char const *fmt, ...) __attribute__((format(printf, 2, 3)));
24 std::string ToString() {
25 return std::string(buffer_, insert_);
28 private:
29 size_t nbytes_;
30 size_t insert_;
31 char *buffer_;
34 } // namespace nacl
36 #endif