text: #include "uml/impl/ReadIsClassifiedObjectActionImpl.hpp"
  
  #ifdef NDEBUG
  	#define DEBUG_MESSAGE(a) /**/
  #else
  	#define DEBUG_MESSAGE(a) a
  #endif
  
  #ifdef ACTIVITY_DEBUG_ON
      #define ACT_DEBUG(a) a
  #else
      #define ACT_DEBUG(a) /**/
  #endif
  
  //#include "util/ProfileCallCount.hpp"
  
  #include <cassert>
  #include <iostream>
  #include <sstream>
  
  #include "abstractDataTypes/Bag.hpp"
  #include "abstractDataTypes/Subset.hpp"
  #include "abstractDataTypes/SubsetUnion.hpp"
  #include "abstractDataTypes/Union.hpp"
  #include "abstractDataTypes/Any.hpp"
  #include "abstractDataTypes/SubsetUnion.hpp"
  #include "ecore/EAnnotation.hpp"
  #include "ecore/EClass.hpp"
  #include "uml/impl/UmlPackageImpl.hpp"
  
  //Forward declaration includes
  #include "persistence/interfaces/XLoadHandler.hpp" // used for Persistence
  #include "persistence/interfaces/XSaveHandler.hpp" // used for Persistence
  #include "uml/UmlFactory.hpp"
  #include "uml/UmlPackage.hpp"
  #include <exception> // used in Persistence
  
  #include "uml/Action.hpp"
  
  #include "uml/Activity.hpp"
  
  #include "uml/ActivityEdge.hpp"
  
  #include "uml/ActivityGroup.hpp"
  
  #include "uml/ActivityNode.hpp"
  
  #include "uml/ActivityPartition.hpp"
  
  #include "uml/Classifier.hpp"
  
  #include "uml/Comment.hpp"
  
  #include "uml/Constraint.hpp"
  
  #include "uml/Dependency.hpp"
  
  #include "ecore/EAnnotation.hpp"
  
  #include "uml/Element.hpp"
  
  #include "uml/ExceptionHandler.hpp"
  
  #include "uml/InputPin.hpp"
  
  #include "uml/InterruptibleActivityRegion.hpp"
  
  #include "uml/Namespace.hpp"
  
  #include "uml/OutputPin.hpp"
  
  #include "uml/RedefinableElement.hpp"
  
  #include "uml/StringExpression.hpp"
  
  #include "uml/StructuredActivityNode.hpp"
  
  #include "ecore/EcorePackage.hpp"
  #include "ecore/EcoreFactory.hpp"
  #include "uml/UmlPackage.hpp"
  #include "uml/UmlFactory.hpp"
  #include "ecore/EAttribute.hpp"
  #include "ecore/EStructuralFeature.hpp"
  
  using namespace uml;
  
  //*********************************
  // Constructor / Destructor
  //*********************************
  ReadIsClassifiedObjectActionImpl::ReadIsClassifiedObjectActionImpl()
  {
  	//*********************************
  	// Attribute Members
  	//*********************************
  	
  	//*********************************
  	// Reference Members
  	//*********************************
  	//References
  	
  
  	
  
  	
  
  	//Init references
  	
  
  	
  
  	
  }
  
  ReadIsClassifiedObjectActionImpl::~ReadIsClassifiedObjectActionImpl()
  {
  #ifdef SHOW_DELETION
  	std::cout << "-------------------------------------------------------------------------------------------------\r\ndelete ReadIsClassifiedObjectAction "<< this << "\r\n------------------------------------------------------------------------ " << std::endl;
  #endif
  }
  
  
  //Additional constructor for the containments back reference
  			ReadIsClassifiedObjectActionImpl::ReadIsClassifiedObjectActionImpl(std::weak_ptr<uml::Activity > par_activity)
  			:ReadIsClassifiedObjectActionImpl()
  			{
  			    m_activity = par_activity;
  				m_owner = par_activity;
  			}
  
  
  
  
  
  //Additional constructor for the containments back reference
  			ReadIsClassifiedObjectActionImpl::ReadIsClassifiedObjectActionImpl(std::weak_ptr<uml::StructuredActivityNode > par_inStructuredNode)
  			:ReadIsClassifiedObjectActionImpl()
  			{
  			    m_inStructuredNode = par_inStructuredNode;
  				m_owner = par_inStructuredNode;
  			}
  
  
  
  
  
  //Additional constructor for the containments back reference
  			ReadIsClassifiedObjectActionImpl::ReadIsClassifiedObjectActionImpl(std::weak_ptr<uml::Namespace > par_namespace)
  			:ReadIsClassifiedObjectActionImpl()
  			{
  			    m_namespace = par_namespace;
  				m_owner = par_namespace;
  			}
  
  
  
  
  
  //Additional constructor for the containments back reference
  			ReadIsClassifiedObjectActionImpl::ReadIsClassifiedObjectActionImpl(std::weak_ptr<uml::Element > par_owner)
  			:ReadIsClassifiedObjectActionImpl()
  			{
  			    m_owner = par_owner;
  			}
  
  
  
  
  
  
  ReadIsClassifiedObjectActionImpl::ReadIsClassifiedObjectActionImpl(const ReadIsClassifiedObjectActionImpl & obj):ReadIsClassifiedObjectActionImpl()
  {
  	//create copy of all Attributes
  	#ifdef SHOW_COPIES
  	std::cout << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\ncopy ReadIsClassifiedObjectAction "<< this << "\r\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ " << std::endl;
  	#endif
  	m_isDirect = obj.getIsDirect();
  	m_isLeaf = obj.getIsLeaf();
  	m_isLocallyReentrant = obj.getIsLocallyReentrant();
  	m_name = obj.getName();
  	m_qualifiedName = obj.getQualifiedName();
  	m_visibility = obj.getVisibility();
  
  	//copy references with no containment (soft copy)
  	
  	m_activity  = obj.getActivity();
  
  	m_classifier  = obj.getClassifier();
  
  	std::shared_ptr<Bag<uml::Dependency>> _clientDependency = obj.getClientDependency();
  	m_clientDependency.reset(new Bag<uml::Dependency>(*(obj.getClientDependency().get())));
  
  	m_context  = obj.getContext();
  
  	std::shared_ptr<Union<uml::ActivityGroup>> _inGroup = obj.getInGroup();
  	m_inGroup.reset(new Union<uml::ActivityGroup>(*(obj.getInGroup().get())));
  
  	m_inStructuredNode  = obj.getInStructuredNode();
  
  	std::shared_ptr<Bag<uml::ActivityEdge>> _incoming = obj.getIncoming();
  	m_incoming.reset(new Bag<uml::ActivityEdge>(*(obj.getIncoming().get())));
  
  	m_namespace  = obj.getNamespace();
  
  	std::shared_ptr<Bag<uml::ActivityEdge>> _outgoing = obj.getOutgoing();
  	m_outgoing.reset(new Bag<uml::ActivityEdge>(*(obj.getOutgoing().get())));
  
  	m_owner  = obj.getOwner();
  
  	std::shared_ptr<Union<uml::RedefinableElement>> _redefinedElement = obj.getRedefinedElement();
  	m_redefinedElement.reset(new Union<uml::RedefinableElement>(*(obj.getRedefinedElement().get())));
  
  	std::shared_ptr<Union<uml::Classifier>> _redefinitionContext = obj.getRedefinitionContext();
  	m_redefinitionContext.reset(new Union<uml::Classifier>(*(obj.getRedefinitionContext().get())));
  
  
  	//Clone references with containment (deep copy)
  
  	std::shared_ptr<Bag<ecore::EAnnotation>> _eAnnotationsList = obj.getEAnnotations();
  	for(std::shared_ptr<ecore::EAnnotation> _eAnnotations : *_eAnnotationsList)
  	{
  		this->getEAnnotations()->add(std::shared_ptr<ecore::EAnnotation>(std::dynamic_pointer_cast<ecore::EAnnotation>(_eAnnotations->copy())));
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_eAnnotations" << std::endl;
  	#endif
  	std::shared_ptr<Bag<uml::ExceptionHandler>> _handlerList = obj.getHandler();
  	for(std::shared_ptr<uml::ExceptionHandler> _handler : *_handlerList)
  	{
  		this->getHandler()->add(std::shared_ptr<uml::ExceptionHandler>(std::dynamic_pointer_cast<uml::ExceptionHandler>(_handler->copy())));
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_handler" << std::endl;
  	#endif
  	std::shared_ptr<Bag<uml::InterruptibleActivityRegion>> _inInterruptibleRegionList = obj.getInInterruptibleRegion();
  	for(std::shared_ptr<uml::InterruptibleActivityRegion> _inInterruptibleRegion : *_inInterruptibleRegionList)
  	{
  		this->getInInterruptibleRegion()->add(std::shared_ptr<uml::InterruptibleActivityRegion>(std::dynamic_pointer_cast<uml::InterruptibleActivityRegion>(_inInterruptibleRegion->copy())));
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_inInterruptibleRegion" << std::endl;
  	#endif
  	std::shared_ptr<Bag<uml::ActivityPartition>> _inPartitionList = obj.getInPartition();
  	for(std::shared_ptr<uml::ActivityPartition> _inPartition : *_inPartitionList)
  	{
  		this->getInPartition()->add(std::shared_ptr<uml::ActivityPartition>(std::dynamic_pointer_cast<uml::ActivityPartition>(_inPartition->copy())));
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_inPartition" << std::endl;
  	#endif
  	std::shared_ptr<Bag<uml::Constraint>> _localPostconditionList = obj.getLocalPostcondition();
  	for(std::shared_ptr<uml::Constraint> _localPostcondition : *_localPostconditionList)
  	{
  		this->getLocalPostcondition()->add(std::shared_ptr<uml::Constraint>(std::dynamic_pointer_cast<uml::Constraint>(_localPostcondition->copy())));
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_localPostcondition" << std::endl;
  	#endif
  	std::shared_ptr<Bag<uml::Constraint>> _localPreconditionList = obj.getLocalPrecondition();
  	for(std::shared_ptr<uml::Constraint> _localPrecondition : *_localPreconditionList)
  	{
  		this->getLocalPrecondition()->add(std::shared_ptr<uml::Constraint>(std::dynamic_pointer_cast<uml::Constraint>(_localPrecondition->copy())));
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_localPrecondition" << std::endl;
  	#endif
  	if(obj.getNameExpression()!=nullptr)
  	{
  		m_nameExpression = std::dynamic_pointer_cast<uml::StringExpression>(obj.getNameExpression()->copy());
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_nameExpression" << std::endl;
  	#endif
  	if(obj.getObject()!=nullptr)
  	{
  		m_object = std::dynamic_pointer_cast<uml::InputPin>(obj.getObject()->copy());
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_object" << std::endl;
  	#endif
  	std::shared_ptr<Bag<uml::Comment>> _ownedCommentList = obj.getOwnedComment();
  	for(std::shared_ptr<uml::Comment> _ownedComment : *_ownedCommentList)
  	{
  		this->getOwnedComment()->add(std::shared_ptr<uml::Comment>(std::dynamic_pointer_cast<uml::Comment>(_ownedComment->copy())));
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_ownedComment" << std::endl;
  	#endif
  	std::shared_ptr<Bag<uml::ActivityNode>> _redefinedNodeList = obj.getRedefinedNode();
  	for(std::shared_ptr<uml::ActivityNode> _redefinedNode : *_redefinedNodeList)
  	{
  		this->getRedefinedNode()->add(std::shared_ptr<uml::ActivityNode>(std::dynamic_pointer_cast<uml::ActivityNode>(_redefinedNode->copy())));
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_redefinedNode" << std::endl;
  	#endif
  	if(obj.getResult()!=nullptr)
  	{
  		m_result = std::dynamic_pointer_cast<uml::OutputPin>(obj.getResult()->copy());
  	}
  	#ifdef SHOW_SUBSET_UNION
  		std::cout << "Copying the Subset: " << "m_result" << std::endl;
  	#endif
  
  	
  
  	
  }
  
  std::shared_ptr<ecore::EObject>  ReadIsClassifiedObjectActionImpl::copy() const
  {
  	std::shared_ptr<ReadIsClassifiedObjectActionImpl> element(new ReadIsClassifiedObjectActionImpl(*this));
  	element->setThisReadIsClassifiedObjectActionPtr(element);
  	return element;
  }
  
  std::shared_ptr<ecore::EClass> ReadIsClassifiedObjectActionImpl::eStaticClass() const
  {
  	return UmlPackageImpl::eInstance()->getReadIsClassifiedObjectAction_EClass();
  }
  
  //*********************************
  // Attribute Setter Getter
  //*********************************
  void ReadIsClassifiedObjectActionImpl::setIsDirect(bool _isDirect)
  {
  	m_isDirect = _isDirect;
  } 
  
  bool ReadIsClassifiedObjectActionImpl::getIsDirect() const 
  {
  	return m_isDirect;
  }
  
  //*********************************
  // Operations
  //*********************************
  bool ReadIsClassifiedObjectActionImpl::boolean_result(Any diagnostics,std::map <   Any, Any >  context)
  {
  	std::cout << __PRETTY_FUNCTION__  << std::endl;
  	throw "UnsupportedOperationException";
  }
  
  bool ReadIsClassifiedObjectActionImpl::multiplicity_of_input(Any diagnostics,std::map <   Any, Any >  context)
  {
  	std::cout << __PRETTY_FUNCTION__  << std::endl;
  	throw "UnsupportedOperationException";
  }
  
  bool ReadIsClassifiedObjectActionImpl::multiplicity_of_output(Any diagnostics,std::map <   Any, Any >  context)
  {
  	std::cout << __PRETTY_FUNCTION__  << std::endl;
  	throw "UnsupportedOperationException";
  }
  
  bool ReadIsClassifiedObjectActionImpl::no_type(Any diagnostics,std::map <   Any, Any >  context)
  {
  	std::cout << __PRETTY_FUNCTION__  << std::endl;
  	throw "UnsupportedOperationException";
  }
  
  //*********************************
  // References
  //*********************************
  std::shared_ptr<uml::Classifier > ReadIsClassifiedObjectActionImpl::getClassifier() const
  {
  //assert(m_classifier);
      return m_classifier;
  }
  void ReadIsClassifiedObjectActionImpl::setClassifier(std::shared_ptr<uml::Classifier> _classifier)
  {
      m_classifier = _classifier;
  }
  
  std::shared_ptr<uml::InputPin > ReadIsClassifiedObjectActionImpl::getObject() const
  {
  //assert(m_object);
      return m_object;
  }
  void ReadIsClassifiedObjectActionImpl::setObject(std::shared_ptr<uml::InputPin> _object)
  {
      m_object = _object;
  }
  
  std::shared_ptr<uml::OutputPin > ReadIsClassifiedObjectActionImpl::getResult() const
  {
  //assert(m_result);
      return m_result;
  }
  void ReadIsClassifiedObjectActionImpl::setResult(std::shared_ptr<uml::OutputPin> _result)
  {
      m_result = _result;
  }
  
  //*********************************
  // Union Getter
  //*********************************
  std::shared_ptr<Union<uml::ActivityGroup>> ReadIsClassifiedObjectActionImpl::getInGroup() const
  {
  	return m_inGroup;
  }
  std::shared_ptr<SubsetUnion<uml::InputPin, uml::Element>> ReadIsClassifiedObjectActionImpl::getInput() const
  {
  	return m_input;
  }
  std::shared_ptr<SubsetUnion<uml::OutputPin, uml::Element>> ReadIsClassifiedObjectActionImpl::getOutput() const
  {
  	return m_output;
  }
  std::shared_ptr<Union<uml::Element>> ReadIsClassifiedObjectActionImpl::getOwnedElement() const
  {
  	return m_ownedElement;
  }
  std::weak_ptr<uml::Element > ReadIsClassifiedObjectActionImpl::getOwner() const
  {
  	return m_owner;
  }
  std::shared_ptr<Union<uml::RedefinableElement>> ReadIsClassifiedObjectActionImpl::getRedefinedElement() const
  {
  	return m_redefinedElement;
  }
  
  
  std::shared_ptr<ReadIsClassifiedObjectAction> ReadIsClassifiedObjectActionImpl::getThisReadIsClassifiedObjectActionPtr() const
  {
  	return m_thisReadIsClassifiedObjectActionPtr.lock();
  }
  void ReadIsClassifiedObjectActionImpl::setThisReadIsClassifiedObjectActionPtr(std::weak_ptr<ReadIsClassifiedObjectAction> thisReadIsClassifiedObjectActionPtr)
  {
  	m_thisReadIsClassifiedObjectActionPtr = thisReadIsClassifiedObjectActionPtr;
  	setThisActionPtr(thisReadIsClassifiedObjectActionPtr);
  }
  std::shared_ptr<ecore::EObject> ReadIsClassifiedObjectActionImpl::eContainer() const
  {
  	if(auto wp = m_activity.lock())
  	{
  		return wp;
  	}
  
  	if(auto wp = m_inStructuredNode.lock())
  	{
  		return wp;
  	}
  
  	if(auto wp = m_namespace.lock())
  	{
  		return wp;
  	}
  
  	if(auto wp = m_owner.lock())
  	{
  		return wp;
  	}
  	return nullptr;
  }
  
  //*********************************
  // Structural Feature Getter/Setter
  //*********************************
  Any ReadIsClassifiedObjectActionImpl::eGet(int featureID, bool resolve, bool coreType) const
  {
  	switch(featureID)
  	{
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EREFERENCE_CLASSIFIER:
  			return eAny(getClassifier()); //16028
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EATTRIBUTE_ISDIRECT:
  			return eAny(getIsDirect()); //16029
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EREFERENCE_OBJECT:
  			return eAny(getObject()); //16030
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EREFERENCE_RESULT:
  			return eAny(getResult()); //16031
  	}
  	return ActionImpl::eGet(featureID, resolve, coreType);
  }
  bool ReadIsClassifiedObjectActionImpl::internalEIsSet(int featureID) const
  {
  	switch(featureID)
  	{
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EREFERENCE_CLASSIFIER:
  			return getClassifier() != nullptr; //16028
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EATTRIBUTE_ISDIRECT:
  			return getIsDirect() != false; //16029
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EREFERENCE_OBJECT:
  			return getObject() != nullptr; //16030
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EREFERENCE_RESULT:
  			return getResult() != nullptr; //16031
  	}
  	return ActionImpl::internalEIsSet(featureID);
  }
  bool ReadIsClassifiedObjectActionImpl::eSet(int featureID, Any newValue)
  {
  	switch(featureID)
  	{
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EREFERENCE_CLASSIFIER:
  		{
  			// BOOST CAST
  			std::shared_ptr<uml::Classifier> _classifier = newValue->get<std::shared_ptr<uml::Classifier>>();
  			setClassifier(_classifier); //16028
  			return true;
  		}
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EATTRIBUTE_ISDIRECT:
  		{
  			// BOOST CAST
  			bool _isDirect = newValue->get<bool>();
  			setIsDirect(_isDirect); //16029
  			return true;
  		}
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EREFERENCE_OBJECT:
  		{
  			// BOOST CAST
  			std::shared_ptr<uml::InputPin> _object = newValue->get<std::shared_ptr<uml::InputPin>>();
  			setObject(_object); //16030
  			return true;
  		}
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EREFERENCE_RESULT:
  		{
  			// BOOST CAST
  			std::shared_ptr<uml::OutputPin> _result = newValue->get<std::shared_ptr<uml::OutputPin>>();
  			setResult(_result); //16031
  			return true;
  		}
  	}
  
  	return ActionImpl::eSet(featureID, newValue);
  }
  
  //*********************************
  // Persistence Functions
  //*********************************
  void ReadIsClassifiedObjectActionImpl::load(std::shared_ptr<persistence::interfaces::XLoadHandler> loadHandler)
  {
  	std::map<std::string, std::string> attr_list = loadHandler->getAttributeList();
  	loadAttributes(loadHandler, attr_list);
  
  	//
  	// Create new objects (from references (containment == true))
  	//
  	// get UmlFactory
  	std::shared_ptr<uml::UmlFactory> modelFactory = uml::UmlFactory::eInstance();
  	int numNodes = loadHandler->getNumOfChildNodes();
  	for(int ii = 0; ii < numNodes; ii++)
  	{
  		loadNode(loadHandler->getNextNodeName(), loadHandler, modelFactory);
  	}
  }		
  
  void ReadIsClassifiedObjectActionImpl::loadAttributes(std::shared_ptr<persistence::interfaces::XLoadHandler> loadHandler, std::map<std::string, std::string> attr_list)
  {
  	try
  	{
  		std::map<std::string, std::string>::const_iterator iter;
  	
  		iter = attr_list.find("isDirect");
  		if ( iter != attr_list.end() )
  		{
  			// this attribute is a 'bool'
  			bool value;
  			std::istringstream(iter->second) >> std::boolalpha >> value;
  			this->setIsDirect(value);
  		}
  		std::shared_ptr<ecore::EClass> metaClass = this->eClass(); // get MetaClass
  		iter = attr_list.find("classifier");
  		if ( iter != attr_list.end() )
  		{
  			// add unresolvedReference to loadHandler's list
  			loadHandler->addUnresolvedReference(iter->second, loadHandler->getCurrentObject(), metaClass->getEStructuralFeature("classifier")); // TODO use getEStructuralFeature() with id, for faster access to EStructuralFeature
  		}
  	}
  	catch (std::exception& e)
  	{
  		std::cout << "| ERROR    | " << e.what() << std::endl;
  	}
  	catch (...) 
  	{
  		std::cout << "| ERROR    | " <<  "Exception occurred" << std::endl;
  	}
  
  	ActionImpl::loadAttributes(loadHandler, attr_list);
  }
  
  void ReadIsClassifiedObjectActionImpl::loadNode(std::string nodeName, std::shared_ptr<persistence::interfaces::XLoadHandler> loadHandler, std::shared_ptr<uml::UmlFactory> modelFactory)
  {
  
  	try
  	{
  		if ( nodeName.compare("object") == 0 )
  		{
    			std::string typeName = loadHandler->getCurrentXSITypeName();
  			if (typeName.empty())
  			{
  				typeName = "InputPin";
  			}
  			std::shared_ptr<uml::InputPin> object = std::dynamic_pointer_cast<uml::InputPin>(modelFactory->create(typeName));
  			if (object != nullptr)
  			{
  				this->setObject(object);
  				loadHandler->handleChild(object);
  			}
  			return;
  		}
  
  		if ( nodeName.compare("result") == 0 )
  		{
    			std::string typeName = loadHandler->getCurrentXSITypeName();
  			if (typeName.empty())
  			{
  				typeName = "OutputPin";
  			}
  			std::shared_ptr<uml::OutputPin> result = std::dynamic_pointer_cast<uml::OutputPin>(modelFactory->create(typeName));
  			if (result != nullptr)
  			{
  				this->setResult(result);
  				loadHandler->handleChild(result);
  			}
  			return;
  		}
  	}
  	catch (std::exception& e)
  	{
  		std::cout << "| ERROR    | " << e.what() << std::endl;
  	}
  	catch (...) 
  	{
  		std::cout << "| ERROR    | " <<  "Exception occurred" << std::endl;
  	}
  
  	ActionImpl::loadNode(nodeName, loadHandler, modelFactory);
  }
  
  void ReadIsClassifiedObjectActionImpl::resolveReferences(const int featureID, std::list<std::shared_ptr<ecore::EObject> > references)
  {
  	switch(featureID)
  	{
  		case UmlPackage::READISCLASSIFIEDOBJECTACTION_EREFERENCE_CLASSIFIER:
  		{
  			if (references.size() == 1)
  			{
  				// Cast object to correct type
  				std::shared_ptr<uml::Classifier> _classifier = std::dynamic_pointer_cast<uml::Classifier>( references.front() );
  				setClassifier(_classifier);
  			}
  			
  			return;
  		}
  	}
  	ActionImpl::resolveReferences(featureID, references);
  }
  
  void ReadIsClassifiedObjectActionImpl::save(std::shared_ptr<persistence::interfaces::XSaveHandler> saveHandler) const
  {
  	saveContent(saveHandler);
  
  	ActionImpl::saveContent(saveHandler);
  	
  	ExecutableNodeImpl::saveContent(saveHandler);
  	
  	ActivityNodeImpl::saveContent(saveHandler);
  	
  	ActivityContentImpl::saveContent(saveHandler);
  	RedefinableElementImpl::saveContent(saveHandler);
  	
  	NamedElementImpl::saveContent(saveHandler);
  	
  	ElementImpl::saveContent(saveHandler);
  	
  	ecore::EModelElementImpl::saveContent(saveHandler);
  	ObjectImpl::saveContent(saveHandler);
  	
  	ecore::EObjectImpl::saveContent(saveHandler);
  	
  	
  	
  	
  	
  	
  	
  }
  
  void ReadIsClassifiedObjectActionImpl::saveContent(std::shared_ptr<persistence::interfaces::XSaveHandler> saveHandler) const
  {
  	try
  	{
  		std::shared_ptr<uml::UmlPackage> package = uml::UmlPackage::eInstance();
  
  		// Save 'object'
  		std::shared_ptr<uml::InputPin > object = this->getObject();
  		if (object != nullptr)
  		{
  			saveHandler->addReference(object, "object", object->eClass() != package->getInputPin_EClass());
  		}
  
  		// Save 'result'
  		std::shared_ptr<uml::OutputPin > result = this->getResult();
  		if (result != nullptr)
  		{
  			saveHandler->addReference(result, "result", result->eClass() != package->getOutputPin_EClass());
  		}
  	
   
  		// Add attributes
  		if ( this->eIsSet(package->getReadIsClassifiedObjectAction_EAttribute_isDirect()) )
  		{
  			saveHandler->addAttribute("isDirect", this->getIsDirect());
  		}
  
  		// Add references
  		saveHandler->addReference("classifier", this->getClassifier());
  
  	}
  	catch (std::exception& e)
  	{
  		std::cout << "| ERROR    | " << e.what() << std::endl;
  	}
  }
  
  