This file is indexed.

/usr/include/shogun/io/SerializableXmlFile.h is in libshogun-dev 3.1.1-1.

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
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * Written (W) 2010 Soeren Sonnenburg
 * Copyright (C) 2010 Berlin Institute of Technology
 */
#ifndef __SERIALIZABLE_XML_FILE_H__
#define __SERIALIZABLE_XML_FILE_H__

#include <shogun/lib/config.h>
#ifdef HAVE_XML

#include <shogun/io/SerializableFile.h>
#include <shogun/base/DynArray.h>

#include <libxml/parser.h>
#include <libxml/tree.h>

#define STR_TRUE                   "true"
#define STR_FALSE                  "false"

#define STR_ITEM                   "i"
#define STR_STRING                 "s"
#define STR_SPARSE                 "r"

#define STR_PROP_TYPE              "type"
#define STR_PROP_IS_NULL           "is_null"
#define STR_PROP_INSTANCE_NAME     "instance_name"
#define STR_PROP_GENERIC_NAME      "generic_name"
#define STR_PROP_FEATINDEX         "feat_index"

namespace shogun
{
class CSerializableXmlFile
	:public CSerializableFile
{
	friend class SerializableXmlReader00;

	DynArray<xmlNode*> m_stack_stream;
	xmlDocPtr m_doc;
	bool m_format;

	void init(bool format);
	bool push_node(const xmlChar* name);
	bool join_node(const xmlChar* name);
	bool next_node(const xmlChar* name);
	void pop_node();

protected:
	virtual TSerializableReader* new_reader(
		char* dest_version, size_t n);

	virtual bool write_scalar_wrapped(
		const TSGDataType* type, const void* param);

	virtual bool write_cont_begin_wrapped(
		const TSGDataType* type, index_t len_real_y,
		index_t len_real_x);
	virtual bool write_cont_end_wrapped(
		const TSGDataType* type, index_t len_real_y,
		index_t len_real_x);

	virtual bool write_string_begin_wrapped(
		const TSGDataType* type, index_t length);
	virtual bool write_string_end_wrapped(
		const TSGDataType* type, index_t length);

	virtual bool write_stringentry_begin_wrapped(
		const TSGDataType* type, index_t y);
	virtual bool write_stringentry_end_wrapped(
		const TSGDataType* type, index_t y);

	virtual bool write_sparse_begin_wrapped(
		const TSGDataType* type, index_t length);
	virtual bool write_sparse_end_wrapped(
		const TSGDataType* type, index_t length);

	virtual bool write_sparseentry_begin_wrapped(
		const TSGDataType* type, const SGSparseVectorEntry<char>* first_entry,
		index_t feat_index, index_t y);
	virtual bool write_sparseentry_end_wrapped(
		const TSGDataType* type, const SGSparseVectorEntry<char>* first_entry,
		index_t feat_index, index_t y);

	virtual bool write_item_begin_wrapped(
		const TSGDataType* type, index_t y, index_t x);
	virtual bool write_item_end_wrapped(
		const TSGDataType* type, index_t y, index_t x);

	virtual bool write_sgserializable_begin_wrapped(
		const TSGDataType* type, const char* sgserializable_name,
		EPrimitiveType generic);
	virtual bool write_sgserializable_end_wrapped(
		const TSGDataType* type, const char* sgserializable_name,
		EPrimitiveType generic);

	virtual bool write_type_begin_wrapped(
		const TSGDataType* type, const char* name,
		const char* prefix);
	virtual bool write_type_end_wrapped(
		const TSGDataType* type, const char* name,
		const char* prefix);

public:
	/** default constructor */
	explicit CSerializableXmlFile();

	/** constructor
	 *
	 * @param fname filename to open
	 * @param rw mode, 'r' or 'w'
	 * @param format indent output; for human readable file
	 */
	explicit CSerializableXmlFile(const char* fname, char rw='r',
								  bool format=false);

	/** default destructor */
	virtual ~CSerializableXmlFile();

	/** @return object name */
	virtual const char* get_name() const {
		return "SerializableXmlFile";
	}

	virtual void close();
	virtual bool is_opened();
};
}
#endif /* HAVE_XML  */
#endif /* __SERIALIZABLE_XML_FILE_H__  */