mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 19:34:34 +00:00
clang-format: format test
This commit is contained in:
committed by
Thomas Krijnen
parent
17838f2426
commit
63177a7c35
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user