Institut de Robòtica i Informàtica Industrial
KRD Group

The CuikSuite Project

filename.h File Reference

Definition of the Tfilename type and the associated functions. More...

Go to the source code of this file.

Data Structures

struct  Tfilename
 Data structure to hold the information about the name of a file. More...

Defines

#define CUIK_EXT   "cuik"
 File extension for equation files.
#define SLAM_EXT   "slam"
 File extension for slam files.
#define PARAM_EXT   "param"
#define SOL_EXT   "sol"
#define WORLD_EXT   "world"
#define RMAP_EXT   "rmap"
#define GBOXES_EXT   "gbox"
#define PLOT3D_EXT   "gcl"
#define PLOT2D_EXT   "fig"
#define SAMPLE_EXT   "samples"
 File extension for files with samples.
#define STATE_EXT   "state"

Functions

void CreateFileName (char *path, char *name, char *suffix, char *ext, Tfilename *fn)
 Constructor.
char * GetFileFullName (Tfilename *fn)
 Gets the file full name (paht+name+extension).
char * GetFilePath (Tfilename *fn)
 Gets the file path.
char * GetFileBaseName (Tfilename *fn)
 Gets the file base name (paht+name) .
char * GetFileName (Tfilename *fn)
 Gets the file name.
char * GetFileExtension (Tfilename *fn)
 Gets the file extension.
void DeleteFileName (Tfilename *fn)
 Destructor.

Detailed Description

Functions to deal with file names.

See also:
filename.c Tfilename

Definition in file filename.h.


Define Documentation

#define CUIK_EXT   "cuik"

File extension for equation files

Definition at line 19 of file filename.h.

Referenced by main(), and PrintWorldCS().

#define SLAM_EXT   "slam"

File extension for slam files. They include a description of the trajectory of a robot in 2D and the landmarks it observes.

Definition at line 26 of file filename.h.

#define PARAM_EXT   "param"

File extension for parameter files.

Definition at line 32 of file filename.h.

Referenced by InitParametersFromFile(), main(), and PrintWorldCS().

#define SOL_EXT   "sol"

File extension for solution files.

Definition at line 38 of file filename.h.

Referenced by main(), and SampleCuikSystemInBox().

#define WORLD_EXT   "world"

File extension for problem files.

Definition at line 44 of file filename.h.

Referenced by main().

#define RMAP_EXT   "rmap"

File extension for roadmap files.

Definition at line 50 of file filename.h.

#define GBOXES_EXT   "gbox"

File extension for graph of boxes files.

Definition at line 56 of file filename.h.

#define PLOT3D_EXT   "gcl"

File extension for 3D plot files.

Definition at line 62 of file filename.h.

Referenced by main().

#define PLOT2D_EXT   "fig"

File extension for 2D plot files.

Definition at line 68 of file filename.h.

Referenced by main().

#define SAMPLE_EXT   "samples"

File extension for files including samples.

Definition at line 74 of file filename.h.

Referenced by SampleCuikSystemInBox().

#define STATE_EXT   "state"

File extension for files storing the interval solver state.

Definition at line 80 of file filename.h.

Referenced by main().


Function Documentation

void CreateFileName ( char *  path,
char *  name,
char *  suffix,
char *  ext,
Tfilename fn 
)

Generates a Tfilename structure.

Parameters:
path The path. If not given we get it from the system and is the path from of the directory from where the application is exeucted.
name The name of the file. If the given name includes part of a path, it is removed from the name and added to the path data field.
suffix A suffix to add to the name. Possibly NULL.
ext The extension for the file.
fn The filename structure to create.

Definition at line 21 of file filename.c.

References Tfilename::baseName, Error(), Tfilename::ext, Tfilename::fullName, Tfilename::name, NEW, and Tfilename::path.

Referenced by InitParametersFromFile(), main(), PrintWorldCS(), and SampleCuikSystemInBox().

Here is the call graph for this function:

Here is the caller graph for this function:

char* GetFileFullName ( Tfilename fn  ) 

Gets the file full name (paht+name+extension).

Parameters:
fn The filename structure.
Returns:
Returns the full name for the file.

Definition at line 130 of file filename.c.

References Tfilename::fullName.

Referenced by InitParametersFromFile(), main(), PrintWorldCS(), and SampleCuikSystemInBox().

Here is the caller graph for this function:

char* GetFilePath ( Tfilename fn  ) 

Gets the file path.

Parameters:
fn The filename structure.
Returns:
Returns the path for the file.

Definition at line 135 of file filename.c.

References Tfilename::path.

Referenced by PrintWorldCS().

Here is the caller graph for this function:

char* GetFileBaseName ( Tfilename fn  ) 

Gets the file base name (paht+name).

Parameters:
fn The filename structure.
Returns:
Returns the base name (paht+name) for the file.

Definition at line 145 of file filename.c.

References Tfilename::baseName.

char* GetFileName ( Tfilename fn  ) 

Gets the file name.

Parameters:
fn The filename structure.
Returns:
Returns the name for the file.

Definition at line 140 of file filename.c.

References Tfilename::name.

Referenced by PrintWorldCS().

Here is the caller graph for this function:

char* GetFileExtension ( Tfilename fn  ) 

Gets the file extension.

Parameters:
fn The filename structure.
Returns:
Returns the extension for the file.

Definition at line 150 of file filename.c.

References Tfilename::ext.

void DeleteFileName ( Tfilename fn  ) 

Deleltes the Tfilename structure.

Parameters:
fn The filename structure to delete.

Definition at line 155 of file filename.c.

References Tfilename::ext, Tfilename::fullName, Tfilename::name, and Tfilename::path.

Referenced by InitParametersFromFile(), main(), PrintWorldCS(), and SampleCuikSystemInBox().

Here is the caller graph for this function: