
/*******************************  LICENSE  *******************************

 * (C) Copyright 1996-2016 ECMWF.
 *
 * This software is licensed under the terms of the Apache Licence Version 2.0
 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
 * In applying this licence, ECMWF does not waive the privileges and immunities
 * granted to it by virtue of its status as an intergovernmental organisation nor
 * does it submit to any jurisdiction.

 *******************************  LICENSE  *******************************/

/*! \file{{ object }}Attributes.h
    \brief Definition of {{ object }} Attributes class.

    This file is automatically generated.
    Do Not Edit!

    Generated: {{ generated }}
*/


#ifndef {{ object }}Wrapper_H
#define {{ object }}Wrapper_H

#include "magics.h"
#include "ParameterManager.h"
#include "Factory.h"



#include "{{ object_include }}"


{% if inherit  != "" %}
#include "{{ inherit }}Wrapper.h"
{% endif %}





{% for w  in wrapper -%}
#include "{{ w }}Wrapper.h"
{% endfor %}

namespace magics {

class MagRequest;


{% if inherit  != "" -%}
class {{ object }}Wrapper: public {{ inherit }}Wrapper
{% else %}
class {{ object }}Wrapper
{% endif %}
{
public:
//  --  constructor
    {{ object }}Wrapper();
    {{ object }}Wrapper({{ object }}*);
//  --  destructor
    virtual ~{{ object }}Wrapper();
    virtual void set(const MagRequest&);

    {{ object }}* me()   { return {{ object | lower}}_; }

   	virtual {{ object }}* object() { return {{ object | lower}}_; }


	virtual void object({{ object }}* o) {
		// Remember to delete the previous object
		{{ object | lower}}_ = o;
		{% if inherit  != "" -%}
		  {{ inherit }}Wrapper::object(o);
		{% endif %}

	}



protected:
    {{ object }}* {{ object | lower}}_;


//  --  method
	virtual void print(ostream&) const;


private:
    string tag_;
	friend ostream& operator<<(ostream& s,const {{ object }}Wrapper& p)
	{ p.print(s); return s; }
};

} // namespace magics

#endif
