Пример #1
0
const std::string & AbstractPrimitiveInputAdaptor::valueByKey(const std::string & key) const
{
	for (int i = 0; i < tagsSize(); ++i)
	{
		if (m_Controller->queryStringTable(keyId(i)) == key)
			return m_Controller->queryStringTable(valueId(i));
	}

	return m_Controller->queryStringTable(NULL_STRING_ID); // return "null" string
}
Пример #2
0
// -------------------------------------------------------------------
// Execute
// -------------------------------------------------------------------
void SpectatorToPlayerRequest::Execute(boost::shared_ptr<SmartFox> sfs)
{
	if (room == NULL) {
		room = sfs->LastJoinedRoom();
	}

	boost::shared_ptr<long int> valueId (new long int());
	*valueId = room->Id();
	sfso->PutInt(KEY_ROOM_ID, valueId);
}
Пример #3
0
// -------------------------------------------------------------------
// Execute
// -------------------------------------------------------------------
void InvitationReplyRequest::Execute(boost::shared_ptr<SmartFox> sfs)
{
	boost::shared_ptr<long int> valueId (new long int());
	*valueId = invitation->Id();
	sfso->PutInt(KEY_INVITATION_ID, valueId);

	boost::shared_ptr<unsigned char> valueReply (new unsigned char());
	*valueReply = (unsigned char)(*reply);
	sfso->PutByte(KEY_INVITATION_REPLY, valueReply);

	if (parameters != NULL)
		sfso->PutSFSObject(KEY_INVITATION_PARAMS, parameters);
}
Пример #4
0
Attributes * ShowplanAttributes::newCopy(CollHeap * heap)
{
  ShowplanAttributes * new_copy = new(heap) ShowplanAttributes(valueId(), text());
  *new_copy = *this;
  return new_copy;
}
Пример #5
0
Attributes * ShowplanAttributes::newCopy()
{
  ShowplanAttributes * new_copy = new ShowplanAttributes(valueId(), text());
  *new_copy = *this;
  return new_copy;
}
Пример #6
0
void Variable::setFromCP() {
    if(var_->contains(0))
        valueId(0);
    else
        valueId(var_->value());
}
Пример #7
0
const std::string & AbstractPrimitiveInputAdaptor::value(int index) const
{
	return m_Controller->queryStringTable(valueId(index));
}