15 #include "serialbox-c/Archive.h" 16 #include "serialbox-c/Utility.h" 26 array = allocate<serialboxArrayOfString_t>();
27 array->len = (int)archiveVector.size();
28 array->data = allocate<serialboxString_t>(array->len *
sizeof(
serialboxString_t));
30 for(std::size_t i = 0; i < archiveVector.size(); ++i)
31 array->data[i] = allocateAndCopyString(archiveVector[i]);
static std::string archiveFromExtension(std::string filename)
Deduce the name of the archive according to the extension of the filename
static std::vector< std::string > registeredArchives()
Get a vector of strings of the registered archives.
serialboxArrayOfString_t * serialboxArchiveGetRegisteredArchives(void)
Get an array of C-strings of all registered archives.
SERIALBOX_API typedef char * serialboxString_t
String type of serialbox.
void serialboxFatalError(const char *reason)
Report a fatal error.
char * serialboxArchiveGetArchiveFromExtension(const char *filename)
Deduce the name of the archive according to the extension of the filename