Classes | Typedefs | Functions
generic-driver.h File Reference
#include <vl/generic.h>
#include <vl/stringop.h>
#include <stdio.h>
#include <assert.h>
Include dependency graph for generic-driver.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _VlFileMeta
 Support for command line drivers - Definition. More...

Typedefs

typedef struct _VlFileMeta VlFileMeta
 File meta information type.

Functions

static void vl_file_meta_close (VlFileMeta *self)
 Close the file associated to meta information.
VL_INLINE int vl_file_meta_get_double (VlFileMeta *self, double *x)
 Read double from file.
static int vl_file_meta_open (VlFileMeta *self, char const *basename, char const *mode)
 Open the file associated to meta information.
static int vl_file_meta_parse (VlFileMeta *self, char const *optarg)
 Parse argument for file meta information.
VL_INLINE int vl_file_meta_put_double (VlFileMeta *self, double x)
 Write double to file.
VL_INLINE int vl_file_meta_put_uint8 (VlFileMeta *self, vl_uint8 x)
 Write uint8 to file.

Typedef Documentation

typedef struct _VlFileMeta VlFileMeta

File meta information type.

See also:
_VlFileMeta

Definition at line 42 of file generic-driver.h.


Function Documentation

static void vl_file_meta_close ( VlFileMeta self) [static]

Close the file associated to meta information.

Parameters:
selfFile meta information.

Definition at line 145 of file generic-driver.h.

VL_INLINE int vl_file_meta_get_double ( VlFileMeta self,
double *  x 
)

Read double from file.

Parameters:
selfFile meta information.
xDatum read.
Returns:
error code. The function returns VL_ERR_EOF if the end-of-file is reached and VL_ERR_BAD_ARG if the file is malformed.

Definition at line 236 of file generic-driver.h.

static int vl_file_meta_open ( VlFileMeta self,
char const *  basename,
char const *  mode 
) [static]

Open the file associated to meta information.

Parameters:
selfFile meta information.
basenameBasename.
modeOpening mode (as in fopen).
Returns:
error code. The error may be either either VL_ERR_OVERFLOW if the file name is too long or to VL_ERR_IO if the file cannot be opened.

Definition at line 112 of file generic-driver.h.

static int vl_file_meta_parse ( VlFileMeta self,
char const *  optarg 
) [static]

Parse argument for file meta information.

Parameters:
optargargument to parse.
selfstructure to initalize.

The function parses the string optarg to fill the structure self. optarg is supposed to be composed of two parts: a file protocol specification and a file pattern. Then the function:

Returns:
error code. The funciton may fail either because the file protocol is not recognized (VL_ERR_BAD_ARG) or because the file pattern is too long to be stored (VL_ERR_OVERFLOW).

Definition at line 63 of file generic-driver.h.

VL_INLINE int vl_file_meta_put_double ( VlFileMeta self,
double  x 
)

Write double to file.

Parameters:
selfFile meta information.
xDatum to write.
Returns:
error code. The function returns VL_ERR_ALLOC if the datum cannot be written.

Definition at line 164 of file generic-driver.h.

VL_INLINE int vl_file_meta_put_uint8 ( VlFileMeta self,
vl_uint8  x 
)

Write uint8 to file.

Parameters:
selfFile meta information.
xDatum to write.
Returns:
error code. The function returns VL_ERR_ALLOC if the datum cannot be written.

Definition at line 200 of file generic-driver.h.



libvlfeat
Author(s): Andrea Vedaldi
autogenerated on Thu Jun 6 2019 20:25:51