<commit_before>/*
    ktnefpropertyset.h

    Copyright (C) 2002 <NAME> <<EMAIL>>

    This file is part of KTNEF, the KDE TNEF support library/program.

    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 2 of the License, or
    (at your option) any later version.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
 */

#ifndef KTNEFPROPERTYSET_H
#define KTNEFPROPERTYSET_H

#include <qmap.h>
#include <qvariant.h>

class KTNEFProperty;

class KTNEFPropertySet
{
public:
	KTNEFPropertySet();
	~KTNEFPropertySet();

	/* MAPI properties interface */
	void addProperty( int key, int type, const QVariant& value, const QVariant& name = QVariant(), bool overwrite = false );
	QString findProp(     int key,             const QString& fallback, bool convertToUpper=false);
	QString findNamedProp(const QString& name, const QString& fallback, bool convertToUpper=false);
	QMap<int,KTNEFProperty*>& properties();
	const QMap<int,KTNEFProperty*>& properties() const;
	QVariant property( int key ) const;

	/* TNEF attributes interface */
	void addAttribute( int key, int type, const QVariant& value, bool overwrite = false );
	QMap<int,KTNEFProperty*>& attributes();
	const QMap<int,KTNEFProperty*>& attributes() const;
	QVariant attribute( int key ) const;

	void clear( bool deleteAll = false );

private:<commit_msg>In many cases we don't really have a fallback. If it's null it's null.<commit_after>/*
    ktnefpropertyset.h

    Copyright (C) 2002 <NAME> <<EMAIL>>

    This file is part of KTNEF, the KDE TNEF support library/program.

    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 2 of the License, or
    (at your option) any later version.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
 */

#ifndef KTNEFPROPERTYSET_H
#define KTNEFPROPERTYSET_H

#include <qmap.h>
#include <qvariant.h>

class KTNEFProperty;

class KTNEFPropertySet
{
public:
	KTNEFPropertySet();
	~KTNEFPropertySet();

	/* MAPI properties interface */
	void addProperty( int key, int type, const QVariant& value, const QVariant& name = QVariant(), bool overwrite = false );
	QString findProp(     int key,             const QString& fallback=QString::null, bool convertToUpper=false);
	QString findNamedProp(const QString& name, const QString& fallback=QString::null, bool convertToUpper=false);
	QMap<int,KTNEFProperty*>& properties();
	const QMap<int,KTNEFProperty*>& properties() const;
	QVariant property( int key ) const;

	/* TNEF attributes interface */
	void addAttribute( int key, int type, const QVariant& value, bool overwrite = false );
	QMap<int,KTNEFProperty*>& attributes();
	const QMap<int,KTNEFProperty*>& attributes() const;
	QVariant attribute( int key ) const;

	void clear( bool deleteAll = false );

private:
{'fraction_non_alphanumeric': 0.08937706891363226, 'fraction_numerical': 0.011435449894673488, 'mean_word_length': 4.326923076923077, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5261672', 'n_tokens_mistral': 1044, 'n_tokens_neox': 984, 'n_words': 388}