3
* Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved.
4
* Author: Yoann Vandoorselaere <yoann@prelude-ids.com>
6
* This file is part of the Prelude library.
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2, or (at your option)
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program; see the file COPYING. If not, write to
20
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24
#ifndef _LIBPRELUDE_IDMEF_PATH_HXX
25
#define _LIBPRELUDE_IDMEF_PATH_HXX
28
#include "idmef-path.h"
31
#include "prelude-error.hxx"
32
#include "idmef-value.hxx"
41
IDMEFPath(const char *buffer);
42
IDMEFPath(idmef_path_t *path);
43
IDMEFPath(const IDMEFPath &path);
46
Prelude::IDMEFValue Get(Prelude::IDMEF &message);
47
void Set(Prelude::IDMEF &message, Prelude::IDMEFValue *value);
48
void Set(Prelude::IDMEF &message, Prelude::IDMEFValue &value);
49
void Set(Prelude::IDMEF &message, Prelude::IDMEFTime &time);
50
void Set(Prelude::IDMEF &message, std::string value);
51
void Set(Prelude::IDMEF &message, const char *value);
52
void Set(Prelude::IDMEF &message, int8_t value);
53
void Set(Prelude::IDMEF &message, uint8_t value);
54
void Set(Prelude::IDMEF &message, int16_t value);
55
void Set(Prelude::IDMEF &message, uint16_t value);
56
void Set(Prelude::IDMEF &message, int32_t value);
57
void Set(Prelude::IDMEF &message, uint32_t value);
58
void Set(Prelude::IDMEF &message, int64_t value);
59
void Set(Prelude::IDMEF &message, uint64_t value);
60
void Set(Prelude::IDMEF &message, float value);
61
void Set(Prelude::IDMEF &message, double value);
63
idmef_class_id_t GetClass(int depth=-1);
64
idmef_value_type_id_t GetValueType(int depth=-1);
65
int SetIndex(unsigned int index, int depth=-1);
66
int UndefineIndex(int depth=-1);
67
int GetIndex(int depth=-1);
68
int MakeChild(const char *child_name, unsigned int index);
70
int Compare(IDMEFPath *path, int depth=-1);
74
const char *GetName(int depth=-1);
77
bool IsList(int depth=-1);
78
unsigned int GetDepth();
80
IDMEFPath &operator = (const IDMEFPath &path);