/usr/include/omniEvents/PersistNode.h is in libomnievents-dev 1:2.6.2-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | // Package : omniEvents
// PersistNode.h Created : 2004/04/29
// Author : Alex Tingle
//
// Copyright (C) 2004 Alex Tingle.
//
// This file is part of the omniEvents application.
//
// omniEvents is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// omniEvents 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
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#ifndef OMNIEVENTS__PERSIST_NODE_H
#define OMNIEVENTS__PERSIST_NODE_H
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <string>
#include <map>
#ifdef HAVE_IOSTREAM
# include <iostream>
#else
# include <iostream.h>
#endif
#ifdef HAVE_STD_IOSTREAM
using namespace std;
#endif
namespace OmniEvents {
class PersistNode;
class PersistNode
{
public:
PersistNode(){} ///< Create an empty node.
PersistNode(istream& is); ///< Create root node and read tree from stream.
~PersistNode(); ///< Free node and all its children.
void output(ostream& os,string name) const;
public: // Construction
inline bool readnode(istream& is);
inline bool readtoken(istream& is, string& tok);
PersistNode* addnode(const string& name);
void delnode(const string& name);
void addattr(const string& keyvalue);
void addattr(const string& key,long value);
public: // Accessors
bool hasAttr(const string& key) const;
string attrString(const string& key, const string& fallback="") const;
long attrLong( const string& key, long fallback=0 ) const;
PersistNode* child(const string& key) const;
public: // Members
map<string,PersistNode*> _child;
map<string,string> _attr;
friend class omniEventsLog;
};
}; // end namespace OmniEvents
#endif // OMNIEVENTS__PERSIST_NODE_H
|