clang-format: format test

This commit is contained in:
Dirk Olbrich
2023-09-17 12:30:17 +02:00
committed by Thomas Krijnen
parent 17838f2426
commit 63177a7c35
31 changed files with 6531 additions and 6357 deletions
+43 -37
View File
@@ -27,53 +27,59 @@
#ifndef IFCCHARACTERDECODER_H
#define IFCCHARACTERDECODER_H
#include <string>
#include <sstream>
#include "IfcSpfStream.h"
#include "../ifcparse/IfcSpfStream.h"
#include <sstream>
#include <string>
namespace IfcUtil {
std::wstring::value_type convert_codepage(int codepage, int c);
std::string convert_utf8(const std::wstring& s);
std::wstring convert_utf8(const std::string& s);
std::u32string convert_utf8_to_utf32(const std::string& s);
}
std::wstring::value_type convert_codepage(int codepage, int c);
std::string convert_utf8(const std::wstring& s);
std::wstring convert_utf8(const std::string& s);
std::u32string convert_utf8_to_utf32(const std::string& s);
} // namespace IfcUtil
namespace IfcParse {
class IFC_PARSE_API IfcCharacterDecoder {
private:
IfcParse::IfcSpfStream* file;
int codepage_;
public:
enum ConversionMode {SUBSTITUTE, UTF8, ESCAPE};
static ConversionMode mode;
static char substitution_character;
IfcCharacterDecoder(IfcParse::IfcSpfStream* file);
~IfcCharacterDecoder();
// Only advances the underlying token stream read pointer
// to the next token.
void skip();
// Gets a decoded string representation at the token stream
// read pointer and advances the underlying token stream.
operator std::string();
// Gets a decoded string representation at the offset provided,
// does not mutate the underlying token stream read pointer.
std::string get(unsigned int&);
};
class IFC_PARSE_API IfcCharacterDecoder {
private:
IfcParse::IfcSpfStream* file;
int codepage_;
}
public:
enum ConversionMode {
SUBSTITUTE,
UTF8,
ESCAPE
};
static ConversionMode mode;
static char substitution_character;
IfcCharacterDecoder(IfcParse::IfcSpfStream* file);
~IfcCharacterDecoder();
// Only advances the underlying token stream read pointer
// to the next token.
void skip();
// Gets a decoded string representation at the token stream
// read pointer and advances the underlying token stream.
operator std::string();
// Gets a decoded string representation at the offset provided,
// does not mutate the underlying token stream read pointer.
std::string get(unsigned int&);
};
} // namespace IfcParse
namespace IfcWrite {
class IFC_PARSE_API IfcCharacterEncoder {
private:
std::u32string str;
public:
IfcCharacterEncoder(const std::string& input);
operator std::string();
};
class IFC_PARSE_API IfcCharacterEncoder {
private:
std::u32string str;
}
public:
IfcCharacterEncoder(const std::string& input);
operator std::string();
};
} // namespace IfcWrite
#endif