Exemplo n.º 1
0
	TiXmlElement* GetSParamElement(Parameter *param)
	{
		TiXmlElement *gParamEl = new TiXmlElement("SPar");

		TypeSpec *tSpec = dynamic_cast<TypeSpec*>(param->type);
		TypeRef *tRef = dynamic_cast<TypeRef*>(param->type);
		if (tRef)
			tSpec = static_cast<TypeSpec*>(tRef->type);

		gParamEl->SetAttribute("Qual", tSpec->GetParentModule()->Name.c_str());

		//if (tSpec->IsTagged)
		//	gParamEl->SetAttribute("Name", (tSpec->base ? tSpec->base->Name.c_str() : "NIL"));
		//else
		//	gParamEl->SetAttribute("Name", (tSpec->base ? tSpec->Name.c_str() : "NIL"));
		gParamEl->SetAttribute("Name", tSpec->GetCPPTypeName(false).c_str());

		if (tSpec->IsTagged)
			gParamEl->SetAttribute("Tag", tSpec->Name.c_str());

		return gParamEl;
	}