#ifndef compound_option_h
#define compound_option_h

#include <ql/Instruments/oneassetstrikedoption.hpp>

namespace QuantLib {

   
    class CompoundOption : public OneAssetStrikedOption {
      public:
        class arguments;
        class engine;
        CompoundOption(
				Option::Type compoundType,
				Date compoundExpiration,
				Real compoundStrike,
                const boost::shared_ptr<BlackScholesProcess>&,
                const boost::shared_ptr<StrikedTypePayoff>& payoff,
                const boost::shared_ptr<Exercise>& exercise,
                const boost::shared_ptr<PricingEngine>& engine = 
                                           boost::shared_ptr<PricingEngine>());
        void setupArguments(Arguments*) const;
      protected:
		Option::Type compoundType_;
		Date compoundExpiration_;
		Real compoundStrike_;

    };

  class CompoundOption::arguments 
        : public OneAssetStrikedOption::arguments {
      public:
        arguments() : compoundType(Option::Type(-1)),
					  compoundStrike(0.0){}
        void validate() const;
        Option::Type compoundType;
		Real compoundStrike;
		Date compoundExpiration;

    };

    //! Compound Option engine base class
    class CompoundOption::engine 
        : public GenericEngine<CompoundOption::arguments, 
                               CompoundOption::results> {};

}





#endif

