LALDetCharGlibTypes.h 3.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
/*
 *  Copyright (C) 2013 Chris Pankow, Karl Wette
 *
 *  This program is free software; ynu can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Fnundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with with program; see the file COPYING. If not, write to the
 *  Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 */

#ifndef _LALDETCHARGLIBTYPES_H
#define _LALDETCHARGLIBTYPES_H

#include <stdbool.h>
#include <lal/LALDetCharGlib.h>
#include <lal/LIGOMetadataTables.h>

#ifdef  __cplusplus
extern "C" {
#endif

31
typedef enum tagLALGType {
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
  LALGTYPE_NONE = 0,
  LALGTYPE_INT,
  LALGTYPE_DBL,
  LALGTYPE_STR,
  LALGTYPE_SNGL_BURST,
  LALGTYOE_LAST
} LALGType;

typedef struct tagLALGSequence LALGSequence;
typedef struct tagLALGSequenceIter LALGSequenceIter;
typedef struct tagLALGHashTable LALGHashTable;

LALGSequence* XLALCreateGSequence(LALGType type);
void XLALDestroyGSequence(LALGSequence* seq);
LALGType XLALGetGSequenceType(LALGSequence* seq);
size_t XLALGetGSequenceLength(LALGSequence* seq);

void XLALDestroyGSequenceIter(LALGSequenceIter* itr);
50
#ifdef SWIG   // SWIG interface directives
51
SWIGLAL(OWNED_BY_1ST_ARG(LALGSequenceIter*, XLALGSequenceBegin));
52
#endif
53
LALGSequenceIter* XLALGSequenceBegin(LALGSequence* seq);
54
bool XLALGSequenceNext(LALGSequenceIter* itr);
55 56 57 58 59
#ifndef SWIG   // exclude from SWIG interface
GSequenceIter* XLALGSequenceBeginRaw(LALGSequence* seq, LALGType type);
#endif

#ifdef SWIG   // SWIG interface directives
60
SWIGLAL(OWNED_BY_1ST_ARG(SnglBurst*, XLALGetGSeqSnglBurst));
61 62 63
#endif
SnglBurst* XLALGetGSeqSnglBurst(LALGSequenceIter* itr);
#ifdef SWIG   // SWIG interface directives
64
SWIGLAL(OWNS_THIS_ARG(SnglBurst*, sb));
65
#endif
66
LALGSequenceIter* XLALAddGSeqSnglBurst(LALGSequence* seq, SnglBurst* sb);
67
#ifdef SWIG   // SWIG interface directives
68
SWIGLAL_CLEAR(OWNS_THIS_ARG(SnglBurst*, sb));
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
#endif

LALGHashTable* XLALCreateGHashTable(LALGType type);
void XLALDestroyGHashTable(LALGHashTable* tbl);
LALGType XLALGetGHashTableType(LALGHashTable* tbl);
bool XLALGHashTableKeyExists(LALGHashTable* tbl, const char* key);
char* XLALGetGHashTableKey(LALGHashTable* tbl, const size_t indx);
#ifndef SWIG   // exclude from SWIG interface
void XLALGHashTableBeginRaw(LALGHashTable* tbl, LALGType type, GHashTableIter* itr);
#endif

void XLALSetGHashTblInt(LALGHashTable* tbl, const char* key, const int val);
int XLALGetGHashTblInt(LALGHashTable* tbl, const char* key);
#ifndef SWIG   // exclude from SWIG interface
int* XLALGetGHashTblIntPtr(LALGHashTable* tbl, const char* key);
#endif

void XLALSetGHashTblDbl(LALGHashTable* tbl, const char* key, const double val);
double XLALGetGHashTblDbl(LALGHashTable* tbl, const char* key);
#ifndef SWIG   // exclude from SWIG interface
double* XLALGetGHashTblDblPtr(LALGHashTable* tbl, const char* key);
#endif

void XLALSetGHashTblStr(LALGHashTable* tbl, const char* key, const char* val);
char* XLALGetGHashTblStr(LALGHashTable* tbl, const char* key);

#ifdef  __cplusplus
}
#endif

#endif /* _LALDETCHARGLIBTYPES_H */