// Copyright (C) 2005-2010 Code Synthesis Tools CC
//
// This program was generated by CodeSynthesis XSD, an XML Schema
// to C++ data binding compiler, in the Proprietary License mode.
// You should have received a proprietary license from Code Synthesis
// Tools CC prior to generating this code. See the license text for
// conditions.
//

/**
 * @file
 * @brief Generated from properties_stream_object.xsd.
 */

#ifndef AOSLCPP_AOSL__PROPERTIES_STREAM_OBJECT_HPP
#define AOSLCPP_AOSL__PROPERTIES_STREAM_OBJECT_HPP

// Begin prologue.
//


#include <aoslcpp/common.hpp>



//
// End prologue.

#include <xsd/cxx/config.hxx>

#if (XSD_INT_VERSION != 3030000L)
#error XSD runtime version mismatch
#endif

#include <xsd/cxx/pre.hxx>

#include "aosl/properties_stream_object_forward.hpp"

#include <memory>    // std::auto_ptr
#include <limits>    // std::numeric_limits
#include <algorithm> // std::binary_search

#include <xsd/cxx/xml/char-utf8.hxx>

#include <xsd/cxx/tree/exceptions.hxx>
#include <xsd/cxx/tree/elements.hxx>
#include <xsd/cxx/tree/containers.hxx>
#include <xsd/cxx/tree/list.hxx>

#include <xsd/cxx/xml/dom/parsing-header.hxx>

#include <xsd/cxx/tree/containers-wildcard.hxx>

#ifndef XSD_DONT_INCLUDE_INLINE
#define XSD_DONT_INCLUDE_INLINE

#include "aosl/unit_stream_forward.hpp"

#include "aosl/controller_forward.hpp"

#include "aosl/activation_forward.hpp"

#undef XSD_DONT_INCLUDE_INLINE
#else

#include "aosl/unit_stream_forward.hpp"

#include "aosl/controller_forward.hpp"

#include "aosl/activation_forward.hpp"

#endif // XSD_DONT_INCLUDE_INLINE

/**
 * @brief C++ namespace for the %artofsequence.org/aosl/1.0
 * schema namespace.
 */
namespace aosl
{
  /**
   * @brief Class corresponding to the %properties_stream_object schema type.
   *
   * Stream Object representation. Properties for objects with streaming
   * behaviour.
   *
   * @nosubgrouping
   */
  class Properties_stream_object: public ::xml_schema::Type
  {
    public:
    /**
     * @name begin
     *
     * @brief Accessor and modifier functions for the %begin
     * optional attribute with a default value.
     *
     * Begin position in the stream source.
     */
    //@{

    /**
     * @brief Attribute type.
     */
    typedef ::aosl::Unit_stream BeginType;

    /**
     * @brief Attribute traits type.
     */
    typedef ::xsd::cxx::tree::traits< BeginType, char > BeginTraits;

    /**
     * @brief Return a read-only (constant) reference to the attribute.
     *
     * @return A constant reference to the attribute.
     */
    const BeginType&
    begin () const;

    /**
     * @brief Return a read-write reference to the attribute.
     *
     * @return A reference to the attribute.
     */
    BeginType&
    begin ();

    /**
     * @brief Set the attribute value.
     *
     * @param x A new value to set.
     *
     * This function makes a copy of its argument and sets it as
     * the new value of the attribute.
     */
    void
    begin (const BeginType& x);

    /**
     * @brief Set the attribute value without copying.
     *
     * @param p A new value to use.
     *
     * This function will try to use the passed value directly
     * instead of making a copy.
     */
    void
    begin (::std::auto_ptr< BeginType > p);

    /**
     * @brief Detach the attribute value from the object model.
     *
     * @return A pointer to the attribute value.
     *
     * Note that this function leaves the required attribute in 
     * the original object model uninitialized.
     */
    ::std::auto_ptr< BeginType >
    detach_begin ();

    /**
     * @brief Return the default value for the attribute.
     *
     * @return A read-only (constant) reference to the attribute's
     * default value.
     */
    static const BeginType&
    begin_default_value ();

    //@}

    /**
     * @name end
     *
     * @brief Accessor and modifier functions for the %end
     * optional attribute with a default value.
     *
     * End position in the stream source.
     */
    //@{

    /**
     * @brief Attribute type.
     */
    typedef ::aosl::Unit_stream EndType;

    /**
     * @brief Attribute traits type.
     */
    typedef ::xsd::cxx::tree::traits< EndType, char > EndTraits;

    /**
     * @brief Return a read-only (constant) reference to the attribute.
     *
     * @return A constant reference to the attribute.
     */
    const EndType&
    end () const;

    /**
     * @brief Return a read-write reference to the attribute.
     *
     * @return A reference to the attribute.
     */
    EndType&
    end ();

    /**
     * @brief Set the attribute value.
     *
     * @param x A new value to set.
     *
     * This function makes a copy of its argument and sets it as
     * the new value of the attribute.
     */
    void
    end (const EndType& x);

    /**
     * @brief Set the attribute value without copying.
     *
     * @param p A new value to use.
     *
     * This function will try to use the passed value directly
     * instead of making a copy.
     */
    void
    end (::std::auto_ptr< EndType > p);

    /**
     * @brief Detach the attribute value from the object model.
     *
     * @return A pointer to the attribute value.
     *
     * Note that this function leaves the required attribute in 
     * the original object model uninitialized.
     */
    ::std::auto_ptr< EndType >
    detach_end ();

    /**
     * @brief Return the default value for the attribute.
     *
     * @return A read-only (constant) reference to the attribute's
     * default value.
     */
    static const EndType&
    end_default_value ();

    //@}

    /**
     * @name loop
     *
     * @brief Accessor and modifier functions for the %loop
     * optional attribute with a default value.
     *
     * True if the stream have to loop, false to stop once the end is
    reached. */
    //@{

    /**
     * @brief Attribute type.
     */
    typedef ::xml_schema::Boolean LoopType;

    /**
     * @brief Attribute traits type.
     */
    typedef ::xsd::cxx::tree::traits< LoopType, char > LoopTraits;

    /**
     * @brief Return a read-only (constant) reference to the attribute.
     *
     * @return A constant reference to the attribute.
     */
    const LoopType&
    loop () const;

    /**
     * @brief Return a read-write reference to the attribute.
     *
     * @return A reference to the attribute.
     */
    LoopType&
    loop ();

    /**
     * @brief Set the attribute value.
     *
     * @param x A new value to set.
     *
     * This function makes a copy of its argument and sets it as
     * the new value of the attribute.
     */
    void
    loop (const LoopType& x);

    /**
     * @brief Return the default value for the attribute.
     *
     * @return The attribute's default value.
     */
    static LoopType
    loop_default_value ();

    //@}

    /**
     * @name controller
     *
     * @brief Accessor and modifier functions for the %controller
     * optional attribute with a default value.
     *
     * Tells if the stream should be controllable by the user,
     * involving some kind of player-defined interface if required.
     */
    //@{

    /**
     * @brief Attribute type.
     */
    typedef ::aosl::Controller ControllerType;

    /**
     * @brief Attribute traits type.
     */
    typedef ::xsd::cxx::tree::traits< ControllerType, char > ControllerTraits;

    /**
     * @brief Return a read-only (constant) reference to the attribute.
     *
     * @return A constant reference to the attribute.
     */
    const ControllerType&
    controller () const;

    /**
     * @brief Return a read-write reference to the attribute.
     *
     * @return A reference to the attribute.
     */
    ControllerType&
    controller ();

    /**
     * @brief Set the attribute value.
     *
     * @param x A new value to set.
     *
     * This function makes a copy of its argument and sets it as
     * the new value of the attribute.
     */
    void
    controller (const ControllerType& x);

    /**
     * @brief Set the attribute value without copying.
     *
     * @param p A new value to use.
     *
     * This function will try to use the passed value directly
     * instead of making a copy.
     */
    void
    controller (::std::auto_ptr< ControllerType > p);

    /**
     * @brief Detach the attribute value from the object model.
     *
     * @return A pointer to the attribute value.
     *
     * Note that this function leaves the required attribute in 
     * the original object model uninitialized.
     */
    ::std::auto_ptr< ControllerType >
    detach_controller ();

    /**
     * @brief Return the default value for the attribute.
     *
     * @return A read-only (constant) reference to the attribute's
     * default value.
     */
    static const ControllerType&
    controller_default_value ();

    //@}

    /**
     * @name activation
     *
     * @brief Accessor and modifier functions for the %activation
     * optional attribute with a default value.
     *
     * Tells if the stream will be reset at each activation,
     * or will just continue where it was when it was deactivated.
     */
    //@{

    /**
     * @brief Attribute type.
     */
    typedef ::aosl::Activation ActivationType;

    /**
     * @brief Attribute traits type.
     */
    typedef ::xsd::cxx::tree::traits< ActivationType, char > ActivationTraits;

    /**
     * @brief Return a read-only (constant) reference to the attribute.
     *
     * @return A constant reference to the attribute.
     */
    const ActivationType&
    activation () const;

    /**
     * @brief Return a read-write reference to the attribute.
     *
     * @return A reference to the attribute.
     */
    ActivationType&
    activation ();

    /**
     * @brief Set the attribute value.
     *
     * @param x A new value to set.
     *
     * This function makes a copy of its argument and sets it as
     * the new value of the attribute.
     */
    void
    activation (const ActivationType& x);

    /**
     * @brief Set the attribute value without copying.
     *
     * @param p A new value to use.
     *
     * This function will try to use the passed value directly
     * instead of making a copy.
     */
    void
    activation (::std::auto_ptr< ActivationType > p);

    /**
     * @brief Detach the attribute value from the object model.
     *
     * @return A pointer to the attribute value.
     *
     * Note that this function leaves the required attribute in 
     * the original object model uninitialized.
     */
    ::std::auto_ptr< ActivationType >
    detach_activation ();

    /**
     * @brief Return the default value for the attribute.
     *
     * @return A read-only (constant) reference to the attribute's
     * default value.
     */
    static const ActivationType&
    activation_default_value ();

    //@}

    /**
     * @name Constructors
     */
    //@{

    /**
     * @brief Create an instance from the ultimate base and
     * initializers for required elements and attributes.
     */
    Properties_stream_object ();

    /**
     * @brief Create an instance from a DOM element.
     *
     * @param e A DOM element to extract the data from.
     * @param f Flags to create the new instance with.
     * @param c A pointer to the object that will contain the new
     * instance.
     */
    Properties_stream_object (const ::xercesc::DOMElement& e,
                              ::xml_schema::Flags f = 0,
                              ::xml_schema::Container* c = 0);

    /**
     * @brief Copy constructor.
     *
     * @param x An instance to make a copy of.
     * @param f Flags to create the copy with.
     * @param c A pointer to the object that will contain the copy.
     *
     * For polymorphic object models use the @c _clone function instead.
     */
    Properties_stream_object (const Properties_stream_object& x,
                              ::xml_schema::Flags f = 0,
                              ::xml_schema::Container* c = 0);

    /**
     * @brief Copy the instance polymorphically.
     *
     * @param f Flags to create the copy with.
     * @param c A pointer to the object that will contain the copy.
     * @return A pointer to the dynamically allocated copy.
     *
     * This function ensures that the dynamic type of the instance is
     * used for copying and should be used for polymorphic object
     * models instead of the copy constructor.
     */
    virtual Properties_stream_object*
    _clone (::xml_schema::Flags f = 0,
            ::xml_schema::Container* c = 0) const;

    //@}

    /**
     * @brief Destructor.
     */
    virtual 
    ~Properties_stream_object ();

    // Implementation.
    //

    //@cond

    protected:
    void
    parse (::xsd::cxx::xml::dom::parser< char >&,
           ::xml_schema::Flags);

    protected:
    ::xsd::cxx::tree::one< BeginType > begin_;
    static const BeginType begin_default_value_;
    ::xsd::cxx::tree::one< EndType > end_;
    static const EndType end_default_value_;
    ::xsd::cxx::tree::one< LoopType > loop_;
    ::xsd::cxx::tree::one< ControllerType > controller_;
    static const ControllerType controller_default_value_;
    ::xsd::cxx::tree::one< ActivationType > activation_;
    static const ActivationType activation_default_value_;

    //@endcond
  };

  bool
  operator== (const Properties_stream_object&, const Properties_stream_object&);

  bool
  operator!= (const Properties_stream_object&, const Properties_stream_object&);
}

#ifndef XSD_DONT_INCLUDE_INLINE

#include "aosl/unit_stream.hpp"
#include "aosl/unit_stream.inl"

#include "aosl/controller.hpp"
#include "aosl/controller.inl"

#include "aosl/activation.hpp"
#include "aosl/activation.inl"

#endif // XSD_DONT_INCLUDE_INLINE

#include <iosfwd>

namespace aosl
{
  ::std::ostream&
  operator<< (::std::ostream&, const Properties_stream_object&);
}

#include <iosfwd>

#include <xercesc/sax/InputSource.hpp>
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMErrorHandler.hpp>

namespace aosl
{
}

#include <iosfwd>

#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMErrorHandler.hpp>
#include <xercesc/framework/XMLFormatter.hpp>

#include <xsd/cxx/xml/dom/auto-ptr.hxx>

namespace aosl
{
  void
  operator<< (::xercesc::DOMElement&, const Properties_stream_object&);
}

#ifndef XSD_DONT_INCLUDE_INLINE
#include "aosl/properties_stream_object.inl"
#endif // XSD_DONT_INCLUDE_INLINE

#include <xsd/cxx/post.hxx>

// Begin epilogue.
//
//
// End epilogue.

#endif // AOSLCPP_AOSL__PROPERTIES_STREAM_OBJECT_HPP
