Kohi Game Engine
kasset_utils.h File Reference
#include "assets/kasset_types.h"
#include "defines.h"

Go to the source code of this file.

Functions

KAPI kasset_type kasset_type_from_string (const char *type_str)
 Attempts to convert the provided type string to the appropriate enumeration value. More...
 
KAPI const char * kasset_type_to_string (kasset_type type)
 Converts the given asset type enumeration value to its string representation. NOTE: Returns a copy of the string, which should be freed when no longer used. More...
 
KAPI b8 kasset_type_is_binary (kasset_type type)
 Indicates if the given asset type is a binary asset type. More...
 

Function Documentation

◆ kasset_type_from_string()

KAPI kasset_type kasset_type_from_string ( const char *  type_str)

Attempts to convert the provided type string to the appropriate enumeration value.

Parameters
type_strThe type string to be examined.
Returns
The converted type if successful; otherwise KASSET_TYPE_UNKNOWN.

◆ kasset_type_is_binary()

KAPI b8 kasset_type_is_binary ( kasset_type  type)

Indicates if the given asset type is a binary asset type.

Parameters
typeThe asset type.
Returns
True if the given asset type is binary; otherwise false.

◆ kasset_type_to_string()

KAPI const char* kasset_type_to_string ( kasset_type  type)

Converts the given asset type enumeration value to its string representation. NOTE: Returns a copy of the string, which should be freed when no longer used.

Parameters
typeThe type to be converted.
Returns
The string representation of the type.