StringVector.c File Reference

Author:
Reinhard Prix Creation/destruction/manipulation functions for 'LALStringVector' type objects.
More...

#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <lal/XLALError.h>
#include <lal/StringVector.h>
#include <lal/LALMalloc.h>

Include dependency graph for StringVector.c:

Go to the source code of this file.

Functions

 NRCSID (STRINGVECTORC,"$Id: StringVector.c,v 1.1 2008/02/22 16:11:07 reinhard Exp $")
LALStringVectorXLALAppendString2Vector (LALStringVector *vect, const CHAR *string)
 Append the given string to the string-vector (XLAL interface), return pointer to the resulting string-vector, or NULL on error.
LALStringVectorXLALCreateStringVector (const CHAR *str1,...)
 Create a StringVector from the list of strings passed as arguments.
void XLALDestroyStringVector (LALStringVector *vect)
 XLAL-interface: Free a string-vector ;).
int XLALSortStringVector (LALStringVector *strings)
 Sort string-vector alphabetically.
LALStringVectorXLALParseCSV2StringVector (const CHAR *CSVlist)
 Parse a list of comma-separated values (CSV) into a StringVector.

Variables

const LALStringVector empty_LALStringVector


Detailed Description

Author:
Reinhard Prix Creation/destruction/manipulation functions for 'LALStringVector' type objects.

Revision:

Id
StringVector.c,v 1.1 2008/02/22 16:11:07 reinhard Exp

Definition in file StringVector.c.


Function Documentation

NRCSID ( STRINGVECTORC  ,
"$Id: StringVector.  c,
v 1.1 2008/02/22 16:11:07 reinhard Exp $"   
)

LALStringVector* XLALAppendString2Vector ( LALStringVector vect,
const CHAR string 
)

Append the given string to the string-vector (XLAL interface), return pointer to the resulting string-vector, or NULL on error.

Note:
It is allowed to pass NULL as the input string-vector 'vect', which corresponds to creating a new string-vector with a single element 'string'
Parameters:
vect  input string-vector to append to
string  string to append

Definition at line 62 of file StringVector.c.

LALStringVector* XLALCreateStringVector ( const CHAR str1,
  ... 
)

Create a StringVector from the list of strings passed as arguments.

Note:
All arguments MUST be CHAR* strings. The last argument MUST be NULL, as C cannot deduce the number of arguments otherwise.

Definition at line 108 of file StringVector.c.

void XLALDestroyStringVector ( LALStringVector vect  ) 

XLAL-interface: Free a string-vector ;).

Definition at line 164 of file StringVector.c.

int XLALSortStringVector ( LALStringVector strings  ) 

Sort string-vector alphabetically.

Definition at line 201 of file StringVector.c.

LALStringVector* XLALParseCSV2StringVector ( const CHAR CSVlist  ) 

Parse a list of comma-separated values (CSV) into a StringVector.

Note:
surrounding whitespace is removed from the 'values'.

Definition at line 220 of file StringVector.c.


Variable Documentation

const LALStringVector empty_LALStringVector

Definition at line 45 of file StringVector.c.


Generated on Thu Aug 28 03:13:49 2008 for LAL by  doxygen 1.5.2