3
* @brief An object to represent a value node inside a list of values.
4
* @class ee_valnode valnode.h
8
* Libee - An Event Expression Library inspired by CEE
9
* Copyright 2010 by Rainer Gerhards and Adiscon GmbH.
11
* This file is part of libee.
13
* This library is free software; you can redistribute it and/or
14
* modify it under the terms of the GNU Lesser General Public
15
* License as published by the Free Software Foundation; either
16
* version 2.1 of the License, or (at your option) any later version.
18
* This library is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
* Lesser General Public License for more details.
23
* You should have received a copy of the GNU Lesser General Public
24
* License along with this library; if not, write to the Free Software
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27
* A copy of the LGPL v2.1 can be found in the file "COPYING" in this distribution.
29
#ifndef LIBEE_VALNODE_H_INCLUDED
30
#define LIBEE_VALNODE_H_INCLUDED
33
* An object to represent node inside a list of values.
34
* This probably will only be used inside fields, but I have
35
* created a separate class because I envision some other potential
37
* This is NOT a core CEE object, but rather a libee helper entity.
41
/**< a magic number to prevent some memory adressing errors */
43
struct ee_valnode *next;
47
* Constructor for the ee_valnode object.
49
* @memberof ee_valnode
52
* @return new object or NULL if an error occured
54
static inline struct ee_valnode*
57
struct ee_valnode* valnode;
58
if((valnode = malloc(sizeof(struct ee_valnode))) == NULL) goto done;
59
valnode->objID = ObjID_VALNODE;
67
* Destructor for the ee_valnode object.
68
* Note: only the single object is destructed, \b not the complete node.
69
* So the caller must ensure the last will not be broken.
71
* @memberof ee_valnode
74
* @param valnode The valnode to be discarded.
76
void ee_deleteValnode(struct ee_valnode *valnode);
79
#endif /* #ifndef LIBEE_VALNODE_H_INCLUDED */