#ifndef AFFINETRANSFORM_TYPE_HPP_INCLUDED
#define AFFINETRANSFORM_TYPE_HPP_INCLUDED

#include <iostream>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <vector>
#include <NBO/NBO/ENBOType.h>
#include <NBO/NBOGlobal.h>
#include <NBO/Shared/Base/NBOBaseClass.h>


namespace Inscoper::NBO {

/*!
* \brief Represents the XML complex type AffineTransform.
*
* A matrix used to transform the shape. ⎡ A00, A01, A02 ⎤ ⎢ A10, A11, A12 ⎥ ⎣ 0, 0, 1 ⎦ 
*/
class NBO_EXPORT AffineTransform_Type : public NBOBaseClass {

public:
	
	AffineTransform_Type();
	~AffineTransform_Type();

	/*!
	* \brief Cast a NBOBaseClass to a AffineTransform_Type.
	*
	* \param base The base class to cast
	* \return The casted element, or nullptr if the cast fails
	*/
	static std::shared_ptr<AffineTransform_Type> fromBase(NBOBaseClassPtr base);

	/*!
	* \brief Returns the class type name.
	*
	* \return The class type name
	*/
	std::string getTypeName() const override;

	/*!
	* \brief Returns the XML element name corresponding to this class.
	*
	* \return The XML element name
	*/
	std::string getXMLName() const override;

	/*!
	* \brief Returns the NBO Type corresponding to this class.
	*
	* \return The NBO Type value
	*/
	ENBOType getNBOType() const override;

	/*!
	* \brief Returns a list of all classes derived from this class.
	*
	* \return The list of derived classes
	*/
	std::vector<NBOBaseClassPtr> getChildren() const override;

	/*!
	* \brief Returns a list of all child elements contained in this class.
	*
	* \return The list of child classes
	*/
	std::vector<NBOBaseClassPtr> getSubElements() const override;

	/*!
	* \brief Populates this object from a JSON file.
	*
	* \param path The path to the JSON file
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void fromJsonFile(const std::string& path, bool validate = true);

	/*!
	* \brief Populates this object from a JSON string.
	*
	* \param json_string The JSON content as a string
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void fromJsonString(const std::string& json_string, bool validate = true);

	/*!
	* \brief Populates this object from a XML file.
	*
	* \param path The path to the XML file
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void fromXmlFile(const std::string& path, bool validate = true);

	/*!
	* \brief Populates this object from a XML string.
	*
	* \param xml_string The XML content as a string
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void fromXmlString(const std::string& xml_string, bool validate = true);

	/*!
	* \brief Serializes this object to an XML file.
	*
	* \param filename The path to the output XML file
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void toXmlFile(const std::string& filename, bool validate = true) const;

	/*!
	* \brief Serializes this object to an XML string.
	*
	* \param validate If true, validates constraints on value. Default is true.
	* \return A string containing the XML representation of this object
	*/
	std::string toXmlString(bool validate = true) const;

	/*!
	* \brief Sets the value of the A00 attribute.
	*
	* No description available in the XSD standard.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setA00(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the A00 attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	float getA00() const;

	/*!
	* \brief Resets the A00 attribute to an unset state.
	*
	* No description available in the XSD standard.
	*/
	void resetA00();

	/*!
	* \brief Checks whether the A00 attribute is present.
	*
	* No description available in the XSD standard.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasA00() const;

	/*!
	* \brief Sets the value of the A10 attribute.
	*
	* No description available in the XSD standard.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setA10(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the A10 attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	float getA10() const;

	/*!
	* \brief Resets the A10 attribute to an unset state.
	*
	* No description available in the XSD standard.
	*/
	void resetA10();

	/*!
	* \brief Checks whether the A10 attribute is present.
	*
	* No description available in the XSD standard.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasA10() const;

	/*!
	* \brief Sets the value of the A01 attribute.
	*
	* No description available in the XSD standard.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setA01(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the A01 attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	float getA01() const;

	/*!
	* \brief Resets the A01 attribute to an unset state.
	*
	* No description available in the XSD standard.
	*/
	void resetA01();

	/*!
	* \brief Checks whether the A01 attribute is present.
	*
	* No description available in the XSD standard.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasA01() const;

	/*!
	* \brief Sets the value of the A11 attribute.
	*
	* No description available in the XSD standard.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setA11(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the A11 attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	float getA11() const;

	/*!
	* \brief Resets the A11 attribute to an unset state.
	*
	* No description available in the XSD standard.
	*/
	void resetA11();

	/*!
	* \brief Checks whether the A11 attribute is present.
	*
	* No description available in the XSD standard.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasA11() const;

	/*!
	* \brief Sets the value of the A02 attribute.
	*
	* No description available in the XSD standard.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setA02(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the A02 attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	float getA02() const;

	/*!
	* \brief Resets the A02 attribute to an unset state.
	*
	* No description available in the XSD standard.
	*/
	void resetA02();

	/*!
	* \brief Checks whether the A02 attribute is present.
	*
	* No description available in the XSD standard.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasA02() const;

	/*!
	* \brief Sets the value of the A12 attribute.
	*
	* No description available in the XSD standard.
	*
	* \param value The value to set
	* \param validate If true, validates constraints on value. Default is true.
	*/
	void setA12(const float& value, bool validate = true);

	/*!
	* \brief Returns the value of the A12 attribute.
	*
	* No description available in the XSD standard.
	*
	* \return The value of the attribute
	*/
	float getA12() const;

	/*!
	* \brief Resets the A12 attribute to an unset state.
	*
	* No description available in the XSD standard.
	*/
	void resetA12();

	/*!
	* \brief Checks whether the A12 attribute is present.
	*
	* No description available in the XSD standard.
	*
	* \return true if the attribute has been set, false otherwise
	*/
	bool hasA12() const;


private:
	class Impl;
	std::unique_ptr<Impl> pImpl;

    std::optional<float> A00; // Required attribute
    std::optional<float> A10; // Required attribute
    std::optional<float> A01; // Required attribute
    std::optional<float> A11; // Required attribute
    std::optional<float> A02; // Required attribute
    std::optional<float> A12; // Required attribute
};

/*! Shared pointer for AffineTransform_Type*/
typedef std::shared_ptr<AffineTransform_Type> AffineTransform_TypePtr;

} // namespace Inscoper::NBO

#endif // AFFINETRANSFORM_TYPE_HPP_INCLUDED