Truxton location create
Jump to navigation
Jump to search
This creates a location object.
This corresponds to the [Location] table.
Syntax
uint64_t truxton_location_create(uint64_t truxton_handle);
Parameters
truxton_handle
The Truxton instance this location will belong.
This handle comes from calling truxton_create().
Return value
A handle to a location object.
Sample
void create_location(void)
{
uint64_t truxton = truxton_create();
uint64_t location = truxton_location_create(truxton);
truxton_location_save();
uint64_t new_id = truxton_file_get_id( file_type );
if ( new_id == 0 )
{
printf( "Failed to create new file type\n" );
}
else
{
printf( "Created new file type as id %" PRIu64 "\n", new_id );
}
truxton_location_destroy(location);
truxton_destroy(truxton);
}