<commit_before>#pragma once
#include <core/model/mapiRowModel.h>

namespace propertybag
{
	enum class propBagFlags
	{
		None = 0x0000, // None
		Modified = 0x0001, // The property bag has been modified
		BackedByGetProps = 0x0002, // The property bag is rendering from a GetProps call
		AB = 0x0004, // The property bag represents an Address Book object
	};
	DEFINE_ENUM_FLAG_OPERATORS(propBagFlags)

	enum class propBagType
	{
		MAPIProp,
		Row,
		Account,
	};

	// TODO - Annotate for sal
	class IMAPIPropertyBag
	{
	public:
		virtual ~IMAPIPropertyBag() = default;

		virtual propBagFlags GetFlags() const = 0;
		virtual propBagType GetType() const = 0;
		virtual bool IsEqual(const std::shared_ptr<IMAPIPropertyBag> lpPropBag) const = 0;

		virtual _Check_return_ LPMAPIPROP GetMAPIProp() const = 0;

		// TODO: Should Commit take flags?
		virtual _Check_return_ HRESULT Commit() = 0;
		virtual _Check_return_ LPSPropValue GetOneProp(ULONG ulPropTag) = 0;
		virtual void FreeBuffer(LPSPropValue lpProp) = 0;
		virtual _Check_return_ HRESULT SetProps(ULONG cValues, LPSPropValue lpPropArray) = 0;
		virtual _Check_return_ HRESULT SetProp(LPSPropValue lpProp) = 0;
		virtual _Check_return_ HRESULT DeleteProp(ULONG ulPropTag) = 0;
		bool IsAB() { return (GetFlags() & propBagFlags::AB) == propBagFlags::AB; }

		// Model implementation
		// TODO: make this pure virtual after implemented by existing rows
		virtual _Check_return_ std::vector<std::shared_ptr<model::mapiRowModel>> GetAllModels() { return {}; }
		virtual _Check_return_ std::shared_ptr<model::mapiRowModel> GetOneModel(ULONG /*ulPropTag*/) { return {}; }
	};
} // namespace propertybag<commit_msg>make virtual<commit_after>#pragma once
#include <core/model/mapiRowModel.h>

namespace propertybag
{
	enum class propBagFlags
	{
		None = 0x0000, // None
		Modified = 0x0001, // The property bag has been modified
		BackedByGetProps = 0x0002, // The property bag is rendering from a GetProps call
		AB = 0x0004, // The property bag represents an Address Book object
	};
	DEFINE_ENUM_FLAG_OPERATORS(propBagFlags)

	enum class propBagType
	{
		MAPIProp,
		Row,
		Account,
	};

	// TODO - Annotate for sal
	class IMAPIPropertyBag
	{
	public:
		virtual ~IMAPIPropertyBag() = default;

		virtual propBagFlags GetFlags() const = 0;
		virtual propBagType GetType() const = 0;
		virtual bool IsEqual(const std::shared_ptr<IMAPIPropertyBag> lpPropBag) const = 0;

		virtual _Check_return_ LPMAPIPROP GetMAPIProp() const = 0;

		// TODO: Should Commit take flags?
		virtual _Check_return_ HRESULT Commit() = 0;
		virtual _Check_return_ LPSPropValue GetOneProp(ULONG ulPropTag) = 0;
		virtual void FreeBuffer(LPSPropValue lpProp) = 0;
		virtual _Check_return_ HRESULT SetProps(ULONG cValues, LPSPropValue lpPropArray) = 0;
		virtual _Check_return_ HRESULT SetProp(LPSPropValue lpProp) = 0;
		virtual _Check_return_ HRESULT DeleteProp(ULONG ulPropTag) = 0;
		bool IsAB() { return (GetFlags() & propBagFlags::AB) == propBagFlags::AB; }

		// Model implementation
		virtual _Check_return_ std::vector<std::shared_ptr<model::mapiRowModel>> GetAllModels() = 0;
		virtual _Check_return_ std::shared_ptr<model::mapiRowModel> GetOneModel(ULONG ulPropTag) = 0;
	};
} // namespace propertybag
{'fraction_non_alphanumeric': 0.09307359307359307, 'fraction_numerical': 0.0191713048855906, 'mean_word_length': 4.8499095840868, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '5500446', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1045, 'n_words': 296}