Пример #1
0
bool XMLElement::SetDouble(const String& name, double value)
{
    return SetAttribute(name, String(value));
}
Пример #2
0
bool XMLElement::SetUInt(const String& name, unsigned value)
{
    return SetAttribute(name, String(value));
}
Пример #3
0
bool XMLElement::SetColor(const String& name, const Color& value)
{
    return SetAttribute(name, value.ToString());
}
Пример #4
0
bool XMLElement::SetFloat(const String& name, float value)
{
    return SetAttribute(name, String(value));
}
Пример #5
0
bool XMLElement::SetBool(const String& name, bool value)
{
    return SetAttribute(name, String(value));
}
Пример #6
0
bool XMLElement::SetBuffer(const String& name, const void* data, unsigned size)
{
    String dataStr;
    BufferToString(dataStr, data, size);
    return SetAttribute(name, dataStr);
}
Пример #7
0
void ProjectFile::SetAdcircLocation(QString newLoc)
{
	SetAttribute(TAG_SETTINGS, ATTR_ADCIRCLOCATION, newLoc);
}
Пример #8
0
bool XMLElement::SetAttribute(const String& value)
{
    return SetAttribute(value.CString());
}
Пример #9
0
BOOL CFlashManager::SetContentEditable(IDispatch* pDisp, BOOL bContentEditable)
{
	CFuncLog log(g_pLog, "CFlashManager::SetContentEditable()");
	return SetAttribute(pDisp, CComBSTR(HTML_ATTRIBUTE_CONTENTEDITABLE), CComVariant(bContentEditable ? "true" : "false"));
}
Пример #10
0
void ProjectFile::SetFullDomainFort64(QString newLoc, bool symLink)
{
	if (symLink ? LinkFile(newLoc, projectDirectory.absolutePath()) : CopyFile(newLoc, projectDirectory.absolutePath()))
		SetAttribute(TAG_FULL_DOMAIN, ATTR_FORT64LOCATION, newLoc);
}
Пример #11
0
void LogEntry1Data::ResumeSyncSend(void)
	{
	if (!SyncSendPaused)
		{
		return;
		}

	SyncSendPaused = FALSE;

	if (SyncNumber == CERROR)
		{
		return;
		}

	// We just unpaused and we're assigned a record number... tell everybody
	// else all about ourselves.
	GAINEXCLUSIVEACCESS();
	char Buffer[256];
	
	CopyStringToBuffer(Buffer, Name);
	SetName(Buffer);

	CopyStringToBuffer(Buffer, Initials);
	SetInitials(Buffer);

	CopyStringToBuffer(Buffer, Password);
	SetPassword(Buffer);

	CopyStringToBuffer(Buffer, Surname);
	SetSurname(Buffer);

	CopyStringToBuffer(Buffer, Title);
	SetTitle(Buffer);

	CopyStringToBuffer(Buffer, RealName);
	SetRealName(Buffer);

	CopyStringToBuffer(Buffer, PhoneNumber);
	SetPhoneNumber(Buffer);

	CopyStringToBuffer(Buffer, ForwardAddr);
	SetForwardAddr(Buffer);

	CopyStringToBuffer(Buffer, ForwardAddrNode);
	SetForwardAddrNode(Buffer);

	CopyStringToBuffer(Buffer, ForwardAddrRegion);
	SetForwardAddrRegion(Buffer);

	CopyStringToBuffer(Buffer, PromptFormat);
	SetPromptFormat(Buffer);

	CopyStringToBuffer(Buffer, DateStamp);
	SetDateStamp(Buffer);

	CopyStringToBuffer(Buffer, VerboseDateStamp);
	SetVerboseDateStamp(Buffer);

	CopyStringToBuffer(Buffer, Signature);
	SetSignature(Buffer);

	CopyStringToBuffer(Buffer, NetPrefix);
	SetNetPrefix(Buffer);

	CopyStringToBuffer(Buffer, MailAddr1);
	SetMailAddr1(Buffer);

	CopyStringToBuffer(Buffer, MailAddr2);
	SetMailAddr2(Buffer);

	CopyStringToBuffer(Buffer, MailAddr3);
	SetMailAddr3(Buffer);

	CopyStringToBuffer(Buffer, Alias);
	SetAlias(Buffer);

	CopyStringToBuffer(Buffer, LocID);
	SetLocID(Buffer);

	CopyStringToBuffer(Buffer, MorePrompt);
	SetMorePrompt(Buffer);

	CopyStringToBuffer(Buffer, Occupation);
	SetOccupation(Buffer);

	CopyStringToBuffer(Buffer, WhereHear);
	SetWhereHear(Buffer);

	CopyStringToBuffer(Buffer, LastRoom);
	SetLastRoom(Buffer);

	CopyStringToBuffer(Buffer, LastHall);
	SetLastHall(Buffer);

	CopyStringToBuffer(Buffer, DefaultRoom);
	SetDefaultRoom(Buffer);

	CopyStringToBuffer(Buffer, DefaultHall);
	SetDefaultHall(Buffer);

	CopyStringToBuffer(Buffer, TermType);
	SetTermType(Buffer);
	RELEASEEXCLUSIVEACCESS();

	SetBirthDate(BirthDate);
	SetFirstOn(FirstOn);
	SetSex(Sex);
	SetNulls(Nulls);
	SetWidth(Width);
	SetLinesPerScreen(LinesPerScreen);
	SetAttribute(ATTR_NORMAL, attributes[ATTR_NORMAL]);
	SetAttribute(ATTR_BLINK, attributes[ATTR_BLINK]);
	SetAttribute(ATTR_REVERSE, attributes[ATTR_REVERSE]);
	SetAttribute(ATTR_BOLD, attributes[ATTR_BOLD]);
	SetAttribute(ATTR_UNDERLINE, attributes[ATTR_UNDERLINE]);
	SetNumUserShow(NumUserShow);
	SetDefaultProtocol(DefaultProtocol);
	SetCallTime(CallTime);
	SetCallNumber(CallNumber);
	SetTotalTime(TotalTime);
	SetCredits(Credits);
	SetLogins(Logins);
	SetPosted(Posted);
	SetRead(Read);
	SetPasswordChangeTime(PasswordChangeTime);
	SetCallsToday(CallsToday);
	SetCallLimit(CallLimit);
	SetLastMessage(LastMessage);
	SetDL_Bytes(DL_Bytes);
	SetUL_Bytes(UL_Bytes);
	SetDL_Num(DL_Num);
	SetUL_Num(UL_Num);
	SetPoopcount(Poopcount);

	SetDungeoned(IsDungeoned());
	SetForwardToNode(IsForwardToNode());
	SetAutoNextHall(IsAutoNextHall());
	SetEnterBorders(IsEnterBorders());
	SetVerified(IsVerified());
	SetSurnameLocked(IsSurnameLocked());
	SetDefaultHallLocked(IsDefaultHallLocked());
	SetPsycho(IsPsycho());
	SetViewTitleSurname(IsViewTitleSurname());
	SetViewSubjects(IsViewSubjects());
	SetViewSignatures(IsViewSignatures());
	SetOldIBMGraph(IsOldIBMGraph());
	SetOldIBMANSI(IsOldIBMANSI());
	SetOldIBMColor(IsOldIBMColor());
	SetTwirly(IsTwirly());
	SetAutoVerbose(IsAutoVerbose());
	SetPauseBetweenMessages(IsPauseBetweenMessages());
	SetMinibin(IsMinibin());
	SetClearScreenBetweenMessages(IsClearScreenBetweenMessages());
	SetViewRoomInfoLines(IsViewRoomInfoLines());
	SetViewHallDescription(IsViewHallDescription());
	SetVerboseContinue(IsVerboseContinue());
	SetViewCensoredMessages(IsViewCensoredMessages());
	SetViewBorders(IsViewBorders());
	SetOut300(IsOut300());
	SetUserSignatureLocked(IsUserSignatureLocked());
	SetHideMessageExclusions(IsHideMessageExclusions());
	SetDownload(IsDownload());
	SetUpload(IsUpload());
	SetChat(IsChat());
	SetPrintFile(IsPrintFile());
	SetSpellCheckMode(GetSpellCheckMode());
	SetMakeRoom(IsMakeRoom());
	SetVerboseLogOut(IsVerboseLogOut());
	SetConfirmSave(IsConfirmSave());
	SetConfirmAbort(IsConfirmAbort());
	SetConfirmNoEO(IsConfirmNoEO());
	SetUsePersonalHall(IsUsePersonalHall());
	SetYouAreHere(IsYouAreHere());
	SetIBMRoom(IsIBMRoom());
	SetWideRoom(IsWideRoom());
	SetMusic(IsMusic());
	SetCheckApostropheS(IsCheckApostropheS());
	SetCheckAllCaps(IsCheckAllCaps());
	SetCheckDigits(IsCheckDigits());
	SetExcludeEncryptedMessages(IsExcludeEncryptedMessages());
	SetViewCommas(IsViewCommas());
	SetPUnPauses(IsPUnPauses());
	SetRoman(IsRoman());
	SetSuperSysop(IsSuperSysop());

	SetInuse(IsInuse());
	SetUpperOnly(IsUpperOnly());
	SetLinefeeds(IsLinefeeds());
	SetExpert(IsExpert());
	SetAide(IsAide());
	SetTabs(IsTabs());
	SetOldToo(IsOldToo());
	SetProblem(IsProblem());
	SetUnlisted(IsUnlisted());
	SetPermanent(IsPermanent());
	SetSysop(IsSysop());
	SetNode(IsNode());
	SetNetUser(IsNetUser());
	SetAccounting(IsAccounting());
	SetMail(IsMail());
	SetViewRoomDesc(IsViewRoomDesc());
	}
Пример #12
0
void TiXmlElement::SetAttribute( const char * name, int val )
{       
        char buf[64];
        sprintf( buf, "%d", val );
        SetAttribute( name, buf );
}
Пример #13
0
void SoapServerInternal::GenerateWsdl()
{
	tinyxml2::XMLDocument doc;

	auto root = doc.NewElement("wsdl:definitions");
	root->SetAttribute("name", "BGSService");
	root->SetAttribute("targetNamespace", "http://battle.net");

	int x = 0;

	while (s_Namespaces[x])
	{
		root->SetAttribute(s_Namespaces[x], s_Namespaces[x + 1]);
		x += 2;
	};

	doc.LinkEndChild(root);

	auto types = doc.NewElement("wsdl:types");
	auto schema = doc.NewElement("xs:schema");

	schema->SetAttribute("elementFormDefault", "qualified");
	schema->SetAttribute("targetNamespace", "http://battle.net/types");
  schema->SetAttribute("xmlns:tns", "http://battle.net");
	schema->SetAttribute("xmlns:xs", "http://www.w3.org/2001/XMLSchema");

	map<string, ClassBinding>::iterator it = m_classBindings.begin();

	for (; it != m_classBindings.end(); ++it)
	{
    vector<tinyxml2::XMLElement*> nodes = it->second.GenerateWsdl(&doc);

    for (size_t y = 0; y < nodes.size(); ++y)
    {
      schema->LinkEndChild(nodes[y]);
    }
	}

  map<string, ServiceBinding>::iterator sit = m_soapMappings.begin();

  for (; sit != m_soapMappings.end(); ++sit)
  {
    vector<tinyxml2::XMLElement*> nodes = sit->second.GenerateWsdlElements(&doc);

    for (size_t y = 0; y < nodes.size(); ++y)
    {
      schema->LinkEndChild(nodes[y]);
    }
  }

	types->LinkEndChild(schema);
	root->LinkEndChild(types);

	sit = m_soapMappings.begin();



  tinyxml2::XMLElement* portType = doc.NewElement("wsdl:portType");
  portType->SetAttribute("name", "IBGSService");

	tinyxml2::XMLElement* binding = doc.NewElement("wsdl:binding");
	binding->SetAttribute("name", "BGSService");
	binding->SetAttribute("type", "tns:IBGSService");

	tinyxml2::XMLElement* transport = doc.NewElement("soap:binding");
	transport->SetAttribute("transport", "http://schemas.microsoft.com/soap/tcp");
	binding->LinkEndChild(transport);

  tinyxml2::XMLElement* service = doc.NewElement("wsdl:service");
  service->SetAttribute("name", "BGSService");

	for (; sit != m_soapMappings.end(); ++sit)
	{
		auto r = sit->second.GenerateWsdl(&doc);

		for (size_t y = 0; y < r.size(); ++y)
		{
			root->LinkEndChild(r[y]);
		}

    r = sit->second.GenerateWsdlPortTypeOperations(&doc);

    for (size_t y = 0; y < r.size(); ++y)
    {
      portType->LinkEndChild(r[y]);
    }

    r = sit->second.GenerateWsdlBindingOperations(&doc);

    for (size_t y = 0; y < r.size(); ++y)
    {
      binding->LinkEndChild(r[y]);
    }
	}
  
  root->LinkEndChild(portType);
  root->LinkEndChild(binding);

  tinyxml2::XMLElement* port = doc.NewElement("wsdl:port");
  port->SetAttribute("name", "BGSService");
  port->SetAttribute("binding", "tns:BGSService");

  tinyxml2::XMLElement* address = doc.NewElement("soap:address");
  address->SetAttribute("location", "net.tcp://localhost:666/battlenet/BGSService");

  port->LinkEndChild(address);
  service->LinkEndChild(port);
  root->LinkEndChild(service);

	doc.SaveFile(m_wsdlPath.c_str());
}
Пример #14
0
void TiXmlElement::SetAttribute( const std::string& name, int val )
{
   std::ostringstream oss;
   oss << val;
   SetAttribute( name, oss.str() );
}
Пример #15
0
void TiXmlElement::SetAttribute( const TIXML_STRING& name, int val )
{	
   Ogre::StringStream oss;
   oss << val;
   SetAttribute( name, oss.str().c_str() );
}