Assimp  v4.1. (December 2018)
Assimp::FBX::Util Namespace Reference

Classes

struct  delete_fun
 helper for std::for_each to delete all heap-allocated items in a container More...
 

Functions

std::string AddLineAndColumn (const std::string &prefix, const std::string &text, unsigned int line, unsigned int column)
 Format log/error messages using a given line location in the source file. More...
 
std::string AddOffset (const std::string &prefix, const std::string &text, size_t offset)
 Format log/error messages using a given offset in the source binary file. More...
 
std::string AddTokenText (const std::string &prefix, const std::string &text, const Token *tok)
 Format log/error messages using a given cursor token. More...
 
size_t ComputeDecodedSizeBase64 (const char *in, size_t inLength)
 Compute decoded size of a Base64-encoded string. More...
 
uint8_t DecodeBase64 (char ch)
 Decode a single Base64-encoded character. More...
 
size_t DecodeBase64 (const char *in, size_t inLength, uint8_t *out, size_t maxOutLength)
 Decode a Base64-encoded string. More...
 
void DOMError (const std::string &message, const Element *element)
 
void DOMError (const std::string &message, const Token &token)
 
void DOMWarning (const std::string &message, const Element *element)
 
void DOMWarning (const std::string &message, const Token &token)
 
char EncodeBase64 (char byte)
 
std::string EncodeBase64 (const char *data, size_t length)
 Encode bytes in base64-encoding. More...
 
void EncodeByteBlock (const char *bytes, std::string &out_string, size_t string_pos)
 Encodes a block of 4 bytes to base64 encoding. More...
 
std::shared_ptr< const PropertyTable > GetPropertyTable (const Document &doc, const std::string &templateName, const Element &element, const Scope &sc, bool no_warn)
 
template<typename T >
const T * ProcessSimpleConnection (const Connection &con, bool is_object_property_conn, const char *name, const Element &element, const char **propNameOut=nullptr)
 
const char * TokenTypeString (TokenType t)
 Get a string representation for a TokenType. More...
 

Variables

static const uint8_t base64DecodeTable [128]
 
static const char to_base64_string [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
 

Function Documentation

◆ AddLineAndColumn()

std::string Assimp::FBX::Util::AddLineAndColumn ( const std::string &  prefix,
const std::string &  text,
unsigned int  line,
unsigned int  column 
)

Format log/error messages using a given line location in the source file.

Parameters
prefixMessage prefix to be preprended to the location info.
textMessage text
lineLine index, 1-based
columnColumn index, 1-based
Returns
A string of the following format: {prefix} (line {line}, col {column}) {text}

◆ AddOffset()

std::string Assimp::FBX::Util::AddOffset ( const std::string &  prefix,
const std::string &  text,
size_t  offset 
)

Format log/error messages using a given offset in the source binary file.

Parameters
prefixMessage prefix to be preprended to the location info.
textMessage text
lineLine index, 1-based
columnColumn index, 1-based
Returns
A string of the following format: {prefix} (offset 0x{offset}) {text}

◆ AddTokenText()

std::string Assimp::FBX::Util::AddTokenText ( const std::string &  prefix,
const std::string &  text,
const Token tok 
)

Format log/error messages using a given cursor token.

Parameters
prefixMessage prefix to be preprended to the location info.
textMessage text
tokToken where parsing/processing stopped
Returns
A string of the following format: {prefix} ({token-type}, line {line}, col {column}) {text}

◆ ComputeDecodedSizeBase64()

size_t Assimp::FBX::Util::ComputeDecodedSizeBase64 ( const char *  in,
size_t  inLength 
)

Compute decoded size of a Base64-encoded string.

Parameters
inCharacters to decode.
inLengthNumber of characters to decode.
Returns
size of the decoded data (number of bytes)

◆ DecodeBase64() [1/2]

uint8_t Assimp::FBX::Util::DecodeBase64 ( char  ch)

Decode a single Base64-encoded character.

Parameters
chCharacter to decode (from base64 to binary).
Returns
decoded byte value

◆ DecodeBase64() [2/2]

size_t Assimp::FBX::Util::DecodeBase64 ( const char *  in,
size_t  inLength,
uint8_t out,
size_t  maxOutLength 
)

Decode a Base64-encoded string.

Parameters
inCharacters to decode.
inLengthNumber of characters to decode.
outPointer where we will store the decoded data.
maxOutLengthSize of output buffer.
Returns
size of the decoded data (number of bytes)

◆ DOMError() [1/2]

AI_WONT_RETURN void Assimp::FBX::Util::DOMError ( const std::string &  message,
const Element element 
)

◆ DOMError() [2/2]

AI_WONT_RETURN void Assimp::FBX::Util::DOMError ( const std::string &  message,
const Token token 
)

◆ DOMWarning() [1/2]

void Assimp::FBX::Util::DOMWarning ( const std::string &  message,
const Element element 
)

◆ DOMWarning() [2/2]

void Assimp::FBX::Util::DOMWarning ( const std::string &  message,
const Token token 
)

◆ EncodeBase64() [1/2]

char Assimp::FBX::Util::EncodeBase64 ( char  byte)

◆ EncodeBase64() [2/2]

std::string Assimp::FBX::Util::EncodeBase64 ( const char *  data,
size_t  length 
)

Encode bytes in base64-encoding.

Parameters
dataBinary data to encode.
inLengthNumber of bytes to encode.
Returns
base64-encoded string

◆ EncodeByteBlock()

void Assimp::FBX::Util::EncodeByteBlock ( const char *  bytes,
std::string &  out_string,
size_t  string_pos 
)

Encodes a block of 4 bytes to base64 encoding.

Parameters
bytesBytes to encode.
out_stringString to write encoded values to.
string_posPosition in out_string.

◆ GetPropertyTable()

std::shared_ptr< const PropertyTable > Assimp::FBX::Util::GetPropertyTable ( const Document doc,
const std::string &  templateName,
const Element element,
const Scope sc,
bool  no_warn 
)

◆ ProcessSimpleConnection()

template<typename T >
const T* Assimp::FBX::Util::ProcessSimpleConnection ( const Connection con,
bool  is_object_property_conn,
const char *  name,
const Element element,
const char **  propNameOut = nullptr 
)
inline

◆ TokenTypeString()

const char * Assimp::FBX::Util::TokenTypeString ( TokenType  t)

Get a string representation for a TokenType.

Variable Documentation

◆ base64DecodeTable

const uint8_t Assimp::FBX::Util::base64DecodeTable[128]
static
Initial value:
= {
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 255, 255, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 255, 255, 255, 255,
255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 255,
255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 255, 255, 255, 255, 255
}

◆ to_base64_string

const char Assimp::FBX::Util::to_base64_string[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
static