mirror of
https://github.com/zeldaret/oot.git
synced 2025-01-16 05:26:59 +00:00
493bdbc3c6
subrepo: subdir: "tools/ZAPD" merged: "4751db5c9" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "4751db5c9" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596"
37 lines
No EOL
633 B
C++
37 lines
No EOL
633 B
C++
#pragma once
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class OutputFormatter
|
|
{
|
|
private:
|
|
const int tab_size;
|
|
const int default_indent;
|
|
const int line_limit;
|
|
|
|
int col;
|
|
int nest;
|
|
int nest_indent[8];
|
|
int current_indent;
|
|
|
|
char word[128];
|
|
char space[128];
|
|
char* word_p;
|
|
char* space_p;
|
|
|
|
std::string str;
|
|
|
|
int write(const char* buf, int count);
|
|
|
|
static OutputFormatter* static_instance;
|
|
static int write_static(const char* buf, int count);
|
|
|
|
public:
|
|
OutputFormatter(int tab_size = 4, int default_indent = 4, int line_limit = 120);
|
|
|
|
int (*static_writer())(const char* buf, int count);
|
|
|
|
std::string get_output();
|
|
}; |