test-client-godot/modules/referentialmessage/referentialmessage.cpp
2020-04-11 13:56:47 +02:00

52 lines
No EOL
1.7 KiB
C++

/*
ReferentialMessage : Class to store referential to decode message
Copyright (C) 2019 AleaJactaEst
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "referentialmessage.h"
#include "core/os/os.h"
void ReferentialMessage::_bind_methods()
{
ClassDB::bind_method(D_METHOD("read_referential", "dictionary_message"), &ReferentialMessage::read_referential);
ClassDB::bind_method(D_METHOD("show"), &ReferentialMessage::show);
ClassDB::bind_method(D_METHOD("read_command"), &ReferentialMessage::read_command);
ClassDB::bind_method(D_METHOD("clear_session"), &ReferentialMessage::clear_session);
}
void ReferentialMessage::read_referential(Dictionary dictionary_message)
{
ReferentialMessageCore::clear_session();
ReferentialMessageCore::get_singleton()->read_referential(dictionary_message);
}
void ReferentialMessage::show()
{
ReferentialMessageCore::get_singleton()->show();
}
int ReferentialMessage::read_command(Ref<BitStream> msgin)
{
return ReferentialMessageCore::get_singleton()->read_command(msgin);
}
void ReferentialMessage::clear_session()
{
ReferentialMessageCore::clear_session();
}