#ifndef JEZUK_DOM_SimpleDOM_MUTATIONEVENT_IMPL_H #define JEZUK_DOM_SimpleDOM_MUTATIONEVENT_IMPL_H //////////////////////////// // C++ MutationEvent implementation //////////////////////////// #include #include #include #include //#include namespace Arabica { namespace SimpleDOM { //////////////////////////////////////////////////////////////////// template class MutationEventImpl : virtual public Arabica::DOM::Events::MutationEvent_impl, public EventImpl { public: typedef Arabica::DOM::Node_impl DOMNode_implT; typedef Arabica::DOM::Text_impl DOMText_implT; typedef Arabica::DOM::Document_impl DOMDocument_implT; typedef Arabica::DOM::NamedNodeMap_impl DOMNamedNodeMap_implT; typedef Arabica::DOM::NodeList_impl DOMNodeList_implT; typedef Arabica::DOM::Events::Event EventT; typedef Arabica::DOM::Events::MutationEvent MutationEventT; typedef EventImpl EventImplT; typedef Arabica::DOM::Events::EventTarget EventTargetT; typedef MutationEventImpl MutationEventImplT; MutationEventImpl() { //std::cout << std::endl << "born " << this << std::endl; } // MutationEventImpl virtual ~MutationEventImpl() { //std::cout << std::endl << "die " << this << std::endl; } virtual DOM::Node getRelatedNode() const { return relatedNode_; } virtual stringT getPrevValue() const { return prevValue_; } virtual stringT getNextValue() const { return nextValue_; } virtual stringT getAttrName() const { return attrName_; } virtual typename MutationEventT::AttrChange getAttrChange() const { return attrChange_; } virtual void initMutationEvent(const stringT& typeArg, bool canBubble, bool canCancel, DOM::Node relatedNode, const stringT& prevValueArg, const stringT& nextValueArg, const stringT& attrNameArg, typename MutationEventT::AttrChange attrChangeArg) { EventImplT::type_ = typeArg; EventImplT::canBubble_ = canBubble; EventImplT::canCancel_ = canCancel; relatedNode_ = relatedNode; prevValue_ = prevValueArg; nextValue_ = nextValueArg; attrName_ = attrNameArg; attrChange_ = attrChangeArg; } protected: DOM::Node relatedNode_; stringT prevValue_; stringT nextValue_; stringT attrName_; typename MutationEventT::AttrChange attrChange_; }; // class MutationEventImpl } // namespace SimpleDOM } // namespace Arabica #endif // JEZUK_DOM_SimpleDOM_EVENTTARGET_H // end of file