summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-02 23:03:46 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-02 23:03:46 -0300
commit118eed485e8f928a5a0dab530ae93211afa10525 (patch)
tree83efb5cbcebb7046e5b64dfe1712475a7d3b7f14 /core/io
parentce26eb74bca48f16e9a34b4eb1c34e50dfc5daae (diff)
ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to Variant.
All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
Diffstat (limited to 'core/io')
-rw-r--r--core/io/config_file.cpp16
-rw-r--r--core/io/config_file.h2
-rw-r--r--core/io/http_client.cpp52
-rw-r--r--core/io/http_client.h2
-rw-r--r--core/io/ip.cpp14
-rw-r--r--core/io/ip.h2
-rw-r--r--core/io/networked_multiplayer_peer.cpp16
-rw-r--r--core/io/networked_multiplayer_peer.h2
-rw-r--r--core/io/packet_peer.cpp14
-rw-r--r--core/io/packet_peer.h4
-rw-r--r--core/io/packet_peer_udp.cpp18
-rw-r--r--core/io/packet_peer_udp.h2
-rw-r--r--core/io/pck_packer.cpp6
-rw-r--r--core/io/pck_packer.h2
-rw-r--r--core/io/resource_format_binary.cpp14
-rw-r--r--core/io/resource_format_xml.cpp18
-rw-r--r--core/io/resource_loader.cpp14
-rw-r--r--core/io/resource_loader.h2
-rw-r--r--core/io/stream_peer.cpp90
-rw-r--r--core/io/stream_peer.h4
-rw-r--r--core/io/stream_peer_ssl.cpp8
-rw-r--r--core/io/stream_peer_ssl.h2
-rw-r--r--core/io/stream_peer_tcp.cpp14
-rw-r--r--core/io/stream_peer_tcp.h2
-rw-r--r--core/io/tcp_server.cpp10
-rw-r--r--core/io/tcp_server.h2
-rw-r--r--core/io/xml_parser.cpp34
-rw-r--r--core/io/xml_parser.h2
28 files changed, 184 insertions, 184 deletions
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index 1cf600a0cf..6039a77337 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -206,17 +206,17 @@ Error ConfigFile::load(const String& p_path) {
void ConfigFile::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("set_value","section","key","value"),&ConfigFile::set_value);
- ObjectTypeDB::bind_method(_MD("get_value:Variant","section","key","default"),&ConfigFile::get_value,DEFVAL(Variant()));
+ ClassDB::bind_method(_MD("set_value","section","key","value"),&ConfigFile::set_value);
+ ClassDB::bind_method(_MD("get_value:Variant","section","key","default"),&ConfigFile::get_value,DEFVAL(Variant()));
- ObjectTypeDB::bind_method(_MD("has_section","section"),&ConfigFile::has_section);
- ObjectTypeDB::bind_method(_MD("has_section_key","section","key"),&ConfigFile::has_section_key);
+ ClassDB::bind_method(_MD("has_section","section"),&ConfigFile::has_section);
+ ClassDB::bind_method(_MD("has_section_key","section","key"),&ConfigFile::has_section_key);
- ObjectTypeDB::bind_method(_MD("get_sections"),&ConfigFile::_get_sections);
- ObjectTypeDB::bind_method(_MD("get_section_keys","section"),&ConfigFile::_get_section_keys);
+ ClassDB::bind_method(_MD("get_sections"),&ConfigFile::_get_sections);
+ ClassDB::bind_method(_MD("get_section_keys","section"),&ConfigFile::_get_section_keys);
- ObjectTypeDB::bind_method(_MD("load:Error","path"),&ConfigFile::load);
- ObjectTypeDB::bind_method(_MD("save:Error","path"),&ConfigFile::save);
+ ClassDB::bind_method(_MD("load:Error","path"),&ConfigFile::load);
+ ClassDB::bind_method(_MD("save:Error","path"),&ConfigFile::save);
}
diff --git a/core/io/config_file.h b/core/io/config_file.h
index 6481f05222..bd71fa62c6 100644
--- a/core/io/config_file.h
+++ b/core/io/config_file.h
@@ -34,7 +34,7 @@
class ConfigFile : public Reference {
- OBJ_TYPE(ConfigFile,Reference);
+ GDCLASS(ConfigFile,Reference);
Map< String, Map<String, Variant> > values;
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 4f14a1fc4d..4051ae302f 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -639,32 +639,32 @@ Error HTTPClient::_get_http_data(uint8_t* p_buffer, int p_bytes,int &r_received)
void HTTPClient::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&HTTPClient::set_ip_type);
- ObjectTypeDB::bind_method(_MD("connect:Error","host","port","use_ssl","verify_host"),&HTTPClient::connect,DEFVAL(false),DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("set_connection","connection:StreamPeer"),&HTTPClient::set_connection);
- ObjectTypeDB::bind_method(_MD("get_connection:StreamPeer"),&HTTPClient::get_connection);
- ObjectTypeDB::bind_method(_MD("request_raw","method","url","headers","body"),&HTTPClient::request_raw);
- ObjectTypeDB::bind_method(_MD("request","method","url","headers","body"),&HTTPClient::request,DEFVAL(String()));
- ObjectTypeDB::bind_method(_MD("send_body_text","body"),&HTTPClient::send_body_text);
- ObjectTypeDB::bind_method(_MD("send_body_data","body"),&HTTPClient::send_body_data);
- ObjectTypeDB::bind_method(_MD("close"),&HTTPClient::close);
-
- ObjectTypeDB::bind_method(_MD("has_response"),&HTTPClient::has_response);
- ObjectTypeDB::bind_method(_MD("is_response_chunked"),&HTTPClient::is_response_chunked);
- ObjectTypeDB::bind_method(_MD("get_response_code"),&HTTPClient::get_response_code);
- ObjectTypeDB::bind_method(_MD("get_response_headers"),&HTTPClient::_get_response_headers);
- ObjectTypeDB::bind_method(_MD("get_response_headers_as_dictionary"),&HTTPClient::_get_response_headers_as_dictionary);
- ObjectTypeDB::bind_method(_MD("get_response_body_length"),&HTTPClient::get_response_body_length);
- ObjectTypeDB::bind_method(_MD("read_response_body_chunk"),&HTTPClient::read_response_body_chunk);
- ObjectTypeDB::bind_method(_MD("set_read_chunk_size","bytes"),&HTTPClient::set_read_chunk_size);
-
- ObjectTypeDB::bind_method(_MD("set_blocking_mode","enabled"),&HTTPClient::set_blocking_mode);
- ObjectTypeDB::bind_method(_MD("is_blocking_mode_enabled"),&HTTPClient::is_blocking_mode_enabled);
-
- ObjectTypeDB::bind_method(_MD("get_status"),&HTTPClient::get_status);
- ObjectTypeDB::bind_method(_MD("poll:Error"),&HTTPClient::poll);
-
- ObjectTypeDB::bind_method(_MD("query_string_from_dict:String","fields"),&HTTPClient::query_string_from_dict);
+ ClassDB::bind_method(_MD("set_ip_type","ip_type"),&HTTPClient::set_ip_type);
+ ClassDB::bind_method(_MD("connect:Error","host","port","use_ssl","verify_host"),&HTTPClient::connect,DEFVAL(false),DEFVAL(true));
+ ClassDB::bind_method(_MD("set_connection","connection:StreamPeer"),&HTTPClient::set_connection);
+ ClassDB::bind_method(_MD("get_connection:StreamPeer"),&HTTPClient::get_connection);
+ ClassDB::bind_method(_MD("request_raw","method","url","headers","body"),&HTTPClient::request_raw);
+ ClassDB::bind_method(_MD("request","method","url","headers","body"),&HTTPClient::request,DEFVAL(String()));
+ ClassDB::bind_method(_MD("send_body_text","body"),&HTTPClient::send_body_text);
+ ClassDB::bind_method(_MD("send_body_data","body"),&HTTPClient::send_body_data);
+ ClassDB::bind_method(_MD("close"),&HTTPClient::close);
+
+ ClassDB::bind_method(_MD("has_response"),&HTTPClient::has_response);
+ ClassDB::bind_method(_MD("is_response_chunked"),&HTTPClient::is_response_chunked);
+ ClassDB::bind_method(_MD("get_response_code"),&HTTPClient::get_response_code);
+ ClassDB::bind_method(_MD("get_response_headers"),&HTTPClient::_get_response_headers);
+ ClassDB::bind_method(_MD("get_response_headers_as_dictionary"),&HTTPClient::_get_response_headers_as_dictionary);
+ ClassDB::bind_method(_MD("get_response_body_length"),&HTTPClient::get_response_body_length);
+ ClassDB::bind_method(_MD("read_response_body_chunk"),&HTTPClient::read_response_body_chunk);
+ ClassDB::bind_method(_MD("set_read_chunk_size","bytes"),&HTTPClient::set_read_chunk_size);
+
+ ClassDB::bind_method(_MD("set_blocking_mode","enabled"),&HTTPClient::set_blocking_mode);
+ ClassDB::bind_method(_MD("is_blocking_mode_enabled"),&HTTPClient::is_blocking_mode_enabled);
+
+ ClassDB::bind_method(_MD("get_status"),&HTTPClient::get_status);
+ ClassDB::bind_method(_MD("poll:Error"),&HTTPClient::poll);
+
+ ClassDB::bind_method(_MD("query_string_from_dict:String","fields"),&HTTPClient::query_string_from_dict);
BIND_CONSTANT( METHOD_GET );
diff --git a/core/io/http_client.h b/core/io/http_client.h
index ef0a687cdd..2e78882303 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -37,7 +37,7 @@
class HTTPClient : public Reference {
- OBJ_TYPE(HTTPClient,Reference);
+ GDCLASS(HTTPClient,Reference);
public:
enum ResponseCode {
diff --git a/core/io/ip.cpp b/core/io/ip.cpp
index b057d72e49..0eb1f221c9 100644
--- a/core/io/ip.cpp
+++ b/core/io/ip.cpp
@@ -218,13 +218,13 @@ Array IP::_get_local_addresses() const {
void IP::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("resolve_hostname","host","ip_type"),&IP::resolve_hostname,DEFVAL(IP::TYPE_ANY));
- ObjectTypeDB::bind_method(_MD("resolve_hostname_queue_item","host","ip_type"),&IP::resolve_hostname_queue_item,DEFVAL(IP::TYPE_ANY));
- ObjectTypeDB::bind_method(_MD("get_resolve_item_status","id"),&IP::get_resolve_item_status);
- ObjectTypeDB::bind_method(_MD("get_resolve_item_address","id"),&IP::get_resolve_item_address);
- ObjectTypeDB::bind_method(_MD("erase_resolve_item","id"),&IP::erase_resolve_item);
- ObjectTypeDB::bind_method(_MD("get_local_addresses"),&IP::_get_local_addresses);
- ObjectTypeDB::bind_method(_MD("clear_cache"),&IP::clear_cache, DEFVAL(""));
+ ClassDB::bind_method(_MD("resolve_hostname","host","ip_type"),&IP::resolve_hostname,DEFVAL(IP::TYPE_ANY));
+ ClassDB::bind_method(_MD("resolve_hostname_queue_item","host","ip_type"),&IP::resolve_hostname_queue_item,DEFVAL(IP::TYPE_ANY));
+ ClassDB::bind_method(_MD("get_resolve_item_status","id"),&IP::get_resolve_item_status);
+ ClassDB::bind_method(_MD("get_resolve_item_address","id"),&IP::get_resolve_item_address);
+ ClassDB::bind_method(_MD("erase_resolve_item","id"),&IP::erase_resolve_item);
+ ClassDB::bind_method(_MD("get_local_addresses"),&IP::_get_local_addresses);
+ ClassDB::bind_method(_MD("clear_cache"),&IP::clear_cache, DEFVAL(""));
BIND_CONSTANT( RESOLVER_STATUS_NONE );
BIND_CONSTANT( RESOLVER_STATUS_WAITING );
diff --git a/core/io/ip.h b/core/io/ip.h
index 0a0e75fe7b..3e028f2613 100644
--- a/core/io/ip.h
+++ b/core/io/ip.h
@@ -36,7 +36,7 @@
struct _IP_ResolverPrivate;
class IP : public Object {
- OBJ_TYPE( IP, Object );
+ GDCLASS( IP, Object );
OBJ_CATEGORY("Networking");
public:
diff --git a/core/io/networked_multiplayer_peer.cpp b/core/io/networked_multiplayer_peer.cpp
index 47e5f3729c..6133401a8c 100644
--- a/core/io/networked_multiplayer_peer.cpp
+++ b/core/io/networked_multiplayer_peer.cpp
@@ -3,18 +3,18 @@
void NetworkedMultiplayerPeer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_transfer_mode","mode"), &NetworkedMultiplayerPeer::set_transfer_mode );
- ObjectTypeDB::bind_method(_MD("set_target_peer","id"), &NetworkedMultiplayerPeer::set_target_peer );
+ ClassDB::bind_method(_MD("set_transfer_mode","mode"), &NetworkedMultiplayerPeer::set_transfer_mode );
+ ClassDB::bind_method(_MD("set_target_peer","id"), &NetworkedMultiplayerPeer::set_target_peer );
- ObjectTypeDB::bind_method(_MD("get_packet_peer"), &NetworkedMultiplayerPeer::get_packet_peer );
+ ClassDB::bind_method(_MD("get_packet_peer"), &NetworkedMultiplayerPeer::get_packet_peer );
- ObjectTypeDB::bind_method(_MD("poll"), &NetworkedMultiplayerPeer::poll );
+ ClassDB::bind_method(_MD("poll"), &NetworkedMultiplayerPeer::poll );
- ObjectTypeDB::bind_method(_MD("get_connection_status"), &NetworkedMultiplayerPeer::get_connection_status );
- ObjectTypeDB::bind_method(_MD("get_unique_id"), &NetworkedMultiplayerPeer::get_unique_id );
+ ClassDB::bind_method(_MD("get_connection_status"), &NetworkedMultiplayerPeer::get_connection_status );
+ ClassDB::bind_method(_MD("get_unique_id"), &NetworkedMultiplayerPeer::get_unique_id );
- ObjectTypeDB::bind_method(_MD("set_refuse_new_connections","enable"), &NetworkedMultiplayerPeer::set_refuse_new_connections );
- ObjectTypeDB::bind_method(_MD("is_refusing_new_connections"), &NetworkedMultiplayerPeer::is_refusing_new_connections );
+ ClassDB::bind_method(_MD("set_refuse_new_connections","enable"), &NetworkedMultiplayerPeer::set_refuse_new_connections );
+ ClassDB::bind_method(_MD("is_refusing_new_connections"), &NetworkedMultiplayerPeer::is_refusing_new_connections );
BIND_CONSTANT( TRANSFER_MODE_UNRELIABLE );
BIND_CONSTANT( TRANSFER_MODE_UNRELIABLE_ORDERED );
diff --git a/core/io/networked_multiplayer_peer.h b/core/io/networked_multiplayer_peer.h
index 485200a9a9..a59d9367d1 100644
--- a/core/io/networked_multiplayer_peer.h
+++ b/core/io/networked_multiplayer_peer.h
@@ -5,7 +5,7 @@
class NetworkedMultiplayerPeer : public PacketPeer {
- OBJ_TYPE(NetworkedMultiplayerPeer,PacketPeer);
+ GDCLASS(NetworkedMultiplayerPeer,PacketPeer);
protected:
static void _bind_methods();
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index fc95aa0b1e..1d05e95010 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -126,12 +126,12 @@ Error PacketPeer::_get_packet_error() const {
void PacketPeer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_var:Variant"),&PacketPeer::_bnd_get_var);
- ObjectTypeDB::bind_method(_MD("put_var", "var:Variant"),&PacketPeer::put_var);
- ObjectTypeDB::bind_method(_MD("get_packet"),&PacketPeer::_get_packet);
- ObjectTypeDB::bind_method(_MD("put_packet:Error", "buffer"),&PacketPeer::_put_packet);
- ObjectTypeDB::bind_method(_MD("get_packet_error:Error"),&PacketPeer::_get_packet_error);
- ObjectTypeDB::bind_method(_MD("get_available_packet_count"),&PacketPeer::get_available_packet_count);
+ ClassDB::bind_method(_MD("get_var:Variant"),&PacketPeer::_bnd_get_var);
+ ClassDB::bind_method(_MD("put_var", "var:Variant"),&PacketPeer::put_var);
+ ClassDB::bind_method(_MD("get_packet"),&PacketPeer::_get_packet);
+ ClassDB::bind_method(_MD("put_packet:Error", "buffer"),&PacketPeer::_put_packet);
+ ClassDB::bind_method(_MD("get_packet_error:Error"),&PacketPeer::_get_packet_error);
+ ClassDB::bind_method(_MD("get_available_packet_count"),&PacketPeer::get_available_packet_count);
};
/***************/
@@ -145,7 +145,7 @@ void PacketPeerStream::_set_stream_peer(REF p_peer) {
void PacketPeerStream::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_stream_peer","peer:StreamPeer"),&PacketPeerStream::_set_stream_peer);
+ ClassDB::bind_method(_MD("set_stream_peer","peer:StreamPeer"),&PacketPeerStream::_set_stream_peer);
}
Error PacketPeerStream::_poll_buffer() const {
diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h
index ec2f46b82d..7aa8d8d456 100644
--- a/core/io/packet_peer.h
+++ b/core/io/packet_peer.h
@@ -34,7 +34,7 @@
#include "ring_buffer.h"
class PacketPeer : public Reference {
- OBJ_TYPE( PacketPeer, Reference );
+ GDCLASS( PacketPeer, Reference );
Variant _bnd_get_var() const;
void _bnd_put_var(const Variant& p_var);
@@ -71,7 +71,7 @@ public:
class PacketPeerStream : public PacketPeer {
- OBJ_TYPE(PacketPeerStream,PacketPeer);
+ GDCLASS(PacketPeerStream,PacketPeer);
//the way the buffers work sucks, will change later
diff --git a/core/io/packet_peer_udp.cpp b/core/io/packet_peer_udp.cpp
index 6216176e77..91d1fc5f98 100644
--- a/core/io/packet_peer_udp.cpp
+++ b/core/io/packet_peer_udp.cpp
@@ -58,15 +58,15 @@ void PacketPeerUDP::set_ip_type(IP::Type p_type) {
void PacketPeerUDP::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&PacketPeerUDP::set_ip_type);
- ObjectTypeDB::bind_method(_MD("listen:Error","port", "recv_buf_size"),&PacketPeerUDP::listen,DEFVAL(65536));
- ObjectTypeDB::bind_method(_MD("close"),&PacketPeerUDP::close);
- ObjectTypeDB::bind_method(_MD("wait:Error"),&PacketPeerUDP::wait);
- ObjectTypeDB::bind_method(_MD("is_listening"),&PacketPeerUDP::is_listening);
- ObjectTypeDB::bind_method(_MD("get_packet_ip"),&PacketPeerUDP::_get_packet_ip);
- //ObjectTypeDB::bind_method(_MD("get_packet_address"),&PacketPeerUDP::_get_packet_address);
- ObjectTypeDB::bind_method(_MD("get_packet_port"),&PacketPeerUDP::get_packet_port);
- ObjectTypeDB::bind_method(_MD("set_send_address","host","port"),&PacketPeerUDP::_set_send_address);
+ ClassDB::bind_method(_MD("set_ip_type","ip_type"),&PacketPeerUDP::set_ip_type);
+ ClassDB::bind_method(_MD("listen:Error","port", "recv_buf_size"),&PacketPeerUDP::listen,DEFVAL(65536));
+ ClassDB::bind_method(_MD("close"),&PacketPeerUDP::close);
+ ClassDB::bind_method(_MD("wait:Error"),&PacketPeerUDP::wait);
+ ClassDB::bind_method(_MD("is_listening"),&PacketPeerUDP::is_listening);
+ ClassDB::bind_method(_MD("get_packet_ip"),&PacketPeerUDP::_get_packet_ip);
+ //ClassDB::bind_method(_MD("get_packet_address"),&PacketPeerUDP::_get_packet_address);
+ ClassDB::bind_method(_MD("get_packet_port"),&PacketPeerUDP::get_packet_port);
+ ClassDB::bind_method(_MD("set_send_address","host","port"),&PacketPeerUDP::_set_send_address);
}
diff --git a/core/io/packet_peer_udp.h b/core/io/packet_peer_udp.h
index 5f80ea08fc..17a2817f34 100644
--- a/core/io/packet_peer_udp.h
+++ b/core/io/packet_peer_udp.h
@@ -34,7 +34,7 @@
#include "io/packet_peer.h"
class PacketPeerUDP : public PacketPeer {
- OBJ_TYPE(PacketPeerUDP,PacketPeer);
+ GDCLASS(PacketPeerUDP,PacketPeer);
protected:
diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp
index 6d35acf182..a9f357a7c8 100644
--- a/core/io/pck_packer.cpp
+++ b/core/io/pck_packer.cpp
@@ -52,9 +52,9 @@ static void _pad(FileAccess* p_file, int p_bytes) {
void PCKPacker::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("pck_start","pck_name","alignment"),&PCKPacker::pck_start);
- ObjectTypeDB::bind_method(_MD("add_file","pck_path","source_path"),&PCKPacker::add_file);
- ObjectTypeDB::bind_method(_MD("flush","verbose"),&PCKPacker::flush);
+ ClassDB::bind_method(_MD("pck_start","pck_name","alignment"),&PCKPacker::pck_start);
+ ClassDB::bind_method(_MD("add_file","pck_path","source_path"),&PCKPacker::add_file);
+ ClassDB::bind_method(_MD("flush","verbose"),&PCKPacker::flush);
};
diff --git a/core/io/pck_packer.h b/core/io/pck_packer.h
index 2ed5c050c6..a4eba04f2d 100644
--- a/core/io/pck_packer.h
+++ b/core/io/pck_packer.h
@@ -32,7 +32,7 @@ class FileAccess;
class PCKPacker : public Reference {
- OBJ_TYPE(PCKPacker, Reference);
+ GDCLASS(PCKPacker, Reference);
FileAccess* file;
int alignment;
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 109d2d811e..953192306f 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -700,7 +700,7 @@ Error ResourceInteractiveLoaderBinary::poll(){
String t = get_unicode_string();
- Object *obj = ObjectTypeDB::instance(t);
+ Object *obj = ClassDB::instance(t);
if (!obj) {
error=ERR_FILE_CORRUPT;
ERR_EXPLAIN(local_path+":Resource of unrecognized type in file: "+t);
@@ -711,7 +711,7 @@ Error ResourceInteractiveLoaderBinary::poll(){
if (!r) {
error=ERR_FILE_CORRUPT;
memdelete(obj); //bye
- ERR_EXPLAIN(local_path+":Resoucre type in resource field not a resource, type is: "+obj->get_type());
+ ERR_EXPLAIN(local_path+":Resoucre type in resource field not a resource, type is: "+obj->get_class());
ERR_FAIL_COND_V(!r,ERR_FILE_CORRUPT);
}
@@ -1064,7 +1064,7 @@ void ResourceFormatLoaderBinary::get_recognized_extensions_for_type(const String
}
List<String> extensions;
- ObjectTypeDB::get_extensions_for_type(p_type,&extensions);
+ ClassDB::get_extensions_for_type(p_type,&extensions);
extensions.sort();
@@ -1077,7 +1077,7 @@ void ResourceFormatLoaderBinary::get_recognized_extensions_for_type(const String
void ResourceFormatLoaderBinary::get_recognized_extensions(List<String> *p_extensions) const{
List<String> extensions;
- ObjectTypeDB::get_resource_base_extensions(&extensions);
+ ClassDB::get_resource_base_extensions(&extensions);
extensions.sort();
for(List<String>::Element *E=extensions.front();E;E=E->next()) {
@@ -2002,7 +2002,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path,const RES& p_
}
//f->store_32(saved_resources.size()+external_resources.size()); // load steps -not needed
- save_unicode_string(p_resource->get_type());
+ save_unicode_string(p_resource->get_class());
uint64_t md_at = f->get_pos();
f->store_64(0); //offset to impoty metadata
for(int i=0;i<14;i++)
@@ -2019,7 +2019,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path,const RES& p_
ResourceData &rd = resources.push_back(ResourceData())->get();
- rd.type=E->get()->get_type();
+ rd.type=E->get()->get_class();
List<PropertyInfo> property_list;
E->get()->get_property_list( &property_list );
@@ -2064,7 +2064,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path,const RES& p_
for(int i=0;i<save_order.size();i++) {
- save_unicode_string(save_order[i]->get_save_type());
+ save_unicode_string(save_order[i]->get_save_class());
String path = save_order[i]->get_path();
path=relative_paths?local_path.path_to_file(path):path;
save_unicode_string(path);
diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp
index 7174c40fdf..c90adf4f57 100644
--- a/core/io/resource_format_xml.cpp
+++ b/core/io/resource_format_xml.cpp
@@ -1518,7 +1518,7 @@ Error ResourceInteractiveLoaderXML::poll() {
type=resource_type;
}
- Object *obj = ObjectTypeDB::instance(type);
+ Object *obj = ClassDB::instance(type);
if (!obj) {
error=ERR_FILE_CORRUPT;
ERR_EXPLAIN(local_path+":"+itos(get_current_line())+": Object of unrecognized type in file: "+type);
@@ -1529,7 +1529,7 @@ Error ResourceInteractiveLoaderXML::poll() {
if (!r) {
error=ERR_FILE_CORRUPT;
memdelete(obj); //bye
- ERR_EXPLAIN(local_path+":"+itos(get_current_line())+": Object type in resource field not a resource, type is: "+obj->get_type());
+ ERR_EXPLAIN(local_path+":"+itos(get_current_line())+": Object type in resource field not a resource, type is: "+obj->get_class());
ERR_FAIL_COND_V(!r,ERR_FILE_CORRUPT);
}
@@ -1940,7 +1940,7 @@ void ResourceFormatLoaderXML::get_recognized_extensions_for_type(const String& p
}
List<String> extensions;
- ObjectTypeDB::get_extensions_for_type(p_type,&extensions);
+ ClassDB::get_extensions_for_type(p_type,&extensions);
extensions.sort();
@@ -1958,7 +1958,7 @@ void ResourceFormatLoaderXML::get_recognized_extensions_for_type(const String& p
void ResourceFormatLoaderXML::get_recognized_extensions(List<String> *p_extensions) const{
List<String> extensions;
- ObjectTypeDB::get_resource_base_extensions(&extensions);
+ ClassDB::get_resource_base_extensions(&extensions);
extensions.sort();
for(List<String>::Element *E=extensions.front();E;E=E->next()) {
@@ -2225,7 +2225,7 @@ void ResourceFormatSaverXMLInstance::write_property(const String& p_name,const V
params="external=\""+itos(external_resources[res])+"\"";
} else {
- params="resource_type=\""+res->get_save_type()+"\"";
+ params="resource_type=\""+res->get_save_class()+"\"";
if (res->get_path().length() && res->get_path().find("::")==-1) {
@@ -2734,7 +2734,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
write_string("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>",false); //no escape
write_string("\n",false);
- enter_tag("resource_file","type=\""+p_resource->get_type()+"\" subresource_count=\""+itos(saved_resources.size()+external_resources.size())+"\" version=\""+itos(VERSION_MAJOR)+"."+itos(VERSION_MINOR)+"\" version_name=\""+VERSION_FULL_NAME+"\"");
+ enter_tag("resource_file","type=\""+p_resource->get_class()+"\" subresource_count=\""+itos(saved_resources.size()+external_resources.size())+"\" version=\""+itos(VERSION_MAJOR)+"."+itos(VERSION_MINOR)+"\" version_name=\""+VERSION_FULL_NAME+"\"");
write_string("\n",false);
for(Map<RES,int>::Element *E=external_resources.front();E;E=E->next()) {
@@ -2742,7 +2742,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
write_tabs();
String p = E->key()->get_path();
- enter_tag("ext_resource","path=\""+p+"\" type=\""+E->key()->get_save_type()+"\" index=\""+itos(E->get())+"\""); //bundled
+ enter_tag("ext_resource","path=\""+p+"\" type=\""+E->key()->get_save_class()+"\" index=\""+itos(E->get())+"\""); //bundled
exit_tag("ext_resource"); //bundled
write_string("\n",false);
}
@@ -2775,7 +2775,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
if (main)
enter_tag("main_resource",""); //bundled
else if (res->get_path().length() && res->get_path().find("::") == -1 )
- enter_tag("resource","type=\""+res->get_type()+"\" path=\""+res->get_path()+"\""); //bundled
+ enter_tag("resource","type=\""+res->get_class()+"\" path=\""+res->get_path()+"\""); //bundled
else {
if (res->get_subindex()==0) {
@@ -2789,7 +2789,7 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
}
int idx = res->get_subindex();
- enter_tag("resource","type=\""+res->get_type()+"\" path=\"local://"+itos(idx)+"\"");
+ enter_tag("resource","type=\""+res->get_class()+"\" path=\"local://"+itos(idx)+"\"");
if (takeover_paths) {
res->set_path(p_path+"::"+itos(idx),true);
}
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 87e5d72a10..f299a75d85 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -78,16 +78,16 @@ void ResourceLoader::get_recognized_extensions_for_type(const String& p_type,Lis
void ResourceInteractiveLoader::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_resource"),&ResourceInteractiveLoader::get_resource);
- ObjectTypeDB::bind_method(_MD("poll"),&ResourceInteractiveLoader::poll);
- ObjectTypeDB::bind_method(_MD("wait"),&ResourceInteractiveLoader::wait);
- ObjectTypeDB::bind_method(_MD("get_stage"),&ResourceInteractiveLoader::get_stage);
- ObjectTypeDB::bind_method(_MD("get_stage_count"),&ResourceInteractiveLoader::get_stage_count);
+ ClassDB::bind_method(_MD("get_resource"),&ResourceInteractiveLoader::get_resource);
+ ClassDB::bind_method(_MD("poll"),&ResourceInteractiveLoader::poll);
+ ClassDB::bind_method(_MD("wait"),&ResourceInteractiveLoader::wait);
+ ClassDB::bind_method(_MD("get_stage"),&ResourceInteractiveLoader::get_stage);
+ ClassDB::bind_method(_MD("get_stage_count"),&ResourceInteractiveLoader::get_stage_count);
}
class ResourceInteractiveLoaderDefault : public ResourceInteractiveLoader {
- OBJ_TYPE( ResourceInteractiveLoaderDefault, ResourceInteractiveLoader );
+ GDCLASS( ResourceInteractiveLoaderDefault, ResourceInteractiveLoader );
public:
Ref<Resource> resource;
@@ -285,7 +285,7 @@ String ResourceLoader::find_complete_path(const String& p_path,const String& p_t
for(List<String>::Element *E=candidates.front();E;E=E->next()) {
String rt = get_resource_type(E->get());
- if (ObjectTypeDB::is_type(rt,p_type)) {
+ if (ClassDB::is_parent_class(rt,p_type)) {
return E->get();
}
}
diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h
index de54dbde66..7979bd02a7 100644
--- a/core/io/resource_loader.h
+++ b/core/io/resource_loader.h
@@ -37,7 +37,7 @@
class ResourceInteractiveLoader : public Reference {
- OBJ_TYPE(ResourceInteractiveLoader,Reference);
+ GDCLASS(ResourceInteractiveLoader,Reference);
protected:
static void _bind_methods();
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index bc519147d7..218e17278e 100644
--- a/core/io/stream_peer.cpp
+++ b/core/io/stream_peer.cpp
@@ -389,57 +389,57 @@ Variant StreamPeer::get_var(){
void StreamPeer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("put_data","data"),&StreamPeer::_put_data);
- ObjectTypeDB::bind_method(_MD("put_partial_data","data"),&StreamPeer::_put_partial_data);
-
- ObjectTypeDB::bind_method(_MD("get_data","bytes"),&StreamPeer::_get_data);
- ObjectTypeDB::bind_method(_MD("get_partial_data","bytes"),&StreamPeer::_get_partial_data);
-
- ObjectTypeDB::bind_method(_MD("get_available_bytes"),&StreamPeer::get_available_bytes);
-
- ObjectTypeDB::bind_method(_MD("set_big_endian","enable"),&StreamPeer::set_big_endian);
- ObjectTypeDB::bind_method(_MD("is_big_endian_enabled"),&StreamPeer::is_big_endian_enabled);
-
- ObjectTypeDB::bind_method(_MD("put_8","val"),&StreamPeer::put_8);
- ObjectTypeDB::bind_method(_MD("put_u8","val"),&StreamPeer::put_u8);
- ObjectTypeDB::bind_method(_MD("put_16","val"),&StreamPeer::put_16);
- ObjectTypeDB::bind_method(_MD("put_u16","val"),&StreamPeer::put_u16);
- ObjectTypeDB::bind_method(_MD("put_32","val"),&StreamPeer::put_32);
- ObjectTypeDB::bind_method(_MD("put_u32","val"),&StreamPeer::put_u32);
- ObjectTypeDB::bind_method(_MD("put_64","val"),&StreamPeer::put_64);
- ObjectTypeDB::bind_method(_MD("put_u64","val"),&StreamPeer::put_u64);
- ObjectTypeDB::bind_method(_MD("put_float","val"),&StreamPeer::put_float);
- ObjectTypeDB::bind_method(_MD("put_double","val"),&StreamPeer::put_double);
- ObjectTypeDB::bind_method(_MD("put_utf8_string","val"),&StreamPeer::put_utf8_string);
- ObjectTypeDB::bind_method(_MD("put_var","val:Variant"),&StreamPeer::put_var);
-
- ObjectTypeDB::bind_method(_MD("get_8"),&StreamPeer::get_8);
- ObjectTypeDB::bind_method(_MD("get_u8"),&StreamPeer::get_u8);
- ObjectTypeDB::bind_method(_MD("get_16"),&StreamPeer::get_16);
- ObjectTypeDB::bind_method(_MD("get_u16"),&StreamPeer::get_u16);
- ObjectTypeDB::bind_method(_MD("get_32"),&StreamPeer::get_32);
- ObjectTypeDB::bind_method(_MD("get_u32"),&StreamPeer::get_u32);
- ObjectTypeDB::bind_method(_MD("get_64"),&StreamPeer::get_64);
- ObjectTypeDB::bind_method(_MD("get_u64"),&StreamPeer::get_u64);
- ObjectTypeDB::bind_method(_MD("get_float"),&StreamPeer::get_float);
- ObjectTypeDB::bind_method(_MD("get_double"),&StreamPeer::get_double);
- ObjectTypeDB::bind_method(_MD("get_string","bytes"),&StreamPeer::get_string);
- ObjectTypeDB::bind_method(_MD("get_utf8_string","bytes"),&StreamPeer::get_utf8_string);
- ObjectTypeDB::bind_method(_MD("get_var:Variant"),&StreamPeer::get_var);
+ ClassDB::bind_method(_MD("put_data","data"),&StreamPeer::_put_data);
+ ClassDB::bind_method(_MD("put_partial_data","data"),&StreamPeer::_put_partial_data);
+
+ ClassDB::bind_method(_MD("get_data","bytes"),&StreamPeer::_get_data);
+ ClassDB::bind_method(_MD("get_partial_data","bytes"),&StreamPeer::_get_partial_data);
+
+ ClassDB::bind_method(_MD("get_available_bytes"),&StreamPeer::get_available_bytes);
+
+ ClassDB::bind_method(_MD("set_big_endian","enable"),&StreamPeer::set_big_endian);
+ ClassDB::bind_method(_MD("is_big_endian_enabled"),&StreamPeer::is_big_endian_enabled);
+
+ ClassDB::bind_method(_MD("put_8","val"),&StreamPeer::put_8);
+ ClassDB::bind_method(_MD("put_u8","val"),&StreamPeer::put_u8);
+ ClassDB::bind_method(_MD("put_16","val"),&StreamPeer::put_16);
+ ClassDB::bind_method(_MD("put_u16","val"),&StreamPeer::put_u16);
+ ClassDB::bind_method(_MD("put_32","val"),&StreamPeer::put_32);
+ ClassDB::bind_method(_MD("put_u32","val"),&StreamPeer::put_u32);
+ ClassDB::bind_method(_MD("put_64","val"),&StreamPeer::put_64);
+ ClassDB::bind_method(_MD("put_u64","val"),&StreamPeer::put_u64);
+ ClassDB::bind_method(_MD("put_float","val"),&StreamPeer::put_float);
+ ClassDB::bind_method(_MD("put_double","val"),&StreamPeer::put_double);
+ ClassDB::bind_method(_MD("put_utf8_string","val"),&StreamPeer::put_utf8_string);
+ ClassDB::bind_method(_MD("put_var","val:Variant"),&StreamPeer::put_var);
+
+ ClassDB::bind_method(_MD("get_8"),&StreamPeer::get_8);
+ ClassDB::bind_method(_MD("get_u8"),&StreamPeer::get_u8);
+ ClassDB::bind_method(_MD("get_16"),&StreamPeer::get_16);
+ ClassDB::bind_method(_MD("get_u16"),&StreamPeer::get_u16);
+ ClassDB::bind_method(_MD("get_32"),&StreamPeer::get_32);
+ ClassDB::bind_method(_MD("get_u32"),&StreamPeer::get_u32);
+ ClassDB::bind_method(_MD("get_64"),&StreamPeer::get_64);
+ ClassDB::bind_method(_MD("get_u64"),&StreamPeer::get_u64);
+ ClassDB::bind_method(_MD("get_float"),&StreamPeer::get_float);
+ ClassDB::bind_method(_MD("get_double"),&StreamPeer::get_double);
+ ClassDB::bind_method(_MD("get_string","bytes"),&StreamPeer::get_string);
+ ClassDB::bind_method(_MD("get_utf8_string","bytes"),&StreamPeer::get_utf8_string);
+ ClassDB::bind_method(_MD("get_var:Variant"),&StreamPeer::get_var);
}
////////////////////////////////
void StreamPeerBuffer::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("seek","pos"),&StreamPeerBuffer::seek);
- ObjectTypeDB::bind_method(_MD("get_size"),&StreamPeerBuffer::get_size);
- ObjectTypeDB::bind_method(_MD("get_pos"),&StreamPeerBuffer::get_pos);
- ObjectTypeDB::bind_method(_MD("resize","size"),&StreamPeerBuffer::resize);
- ObjectTypeDB::bind_method(_MD("set_data_array","data"),&StreamPeerBuffer::set_data_array);
- ObjectTypeDB::bind_method(_MD("get_data_array"),&StreamPeerBuffer::get_data_array);
- ObjectTypeDB::bind_method(_MD("clear"),&StreamPeerBuffer::clear);
- ObjectTypeDB::bind_method(_MD("duplicate:StreamPeerBuffer"),&StreamPeerBuffer::duplicate);
+ ClassDB::bind_method(_MD("seek","pos"),&StreamPeerBuffer::seek);
+ ClassDB::bind_method(_MD("get_size"),&StreamPeerBuffer::get_size);
+ ClassDB::bind_method(_MD("get_pos"),&StreamPeerBuffer::get_pos);
+ ClassDB::bind_method(_MD("resize","size"),&StreamPeerBuffer::resize);
+ ClassDB::bind_method(_MD("set_data_array","data"),&StreamPeerBuffer::set_data_array);
+ ClassDB::bind_method(_MD("get_data_array"),&StreamPeerBuffer::get_data_array);
+ ClassDB::bind_method(_MD("clear"),&StreamPeerBuffer::clear);
+ ClassDB::bind_method(_MD("duplicate:StreamPeerBuffer"),&StreamPeerBuffer::duplicate);
}
diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h
index 1c415ed5a9..232a908dd7 100644
--- a/core/io/stream_peer.h
+++ b/core/io/stream_peer.h
@@ -32,7 +32,7 @@
#include "reference.h"
class StreamPeer : public Reference {
- OBJ_TYPE( StreamPeer, Reference );
+ GDCLASS( StreamPeer, Reference );
OBJ_CATEGORY("Networking");
protected:
static void _bind_methods();
@@ -94,7 +94,7 @@ public:
class StreamPeerBuffer : public StreamPeer {
- OBJ_TYPE(StreamPeerBuffer,StreamPeer);
+ GDCLASS(StreamPeerBuffer,StreamPeer);
DVector<uint8_t> data;
int pointer;
diff --git a/core/io/stream_peer_ssl.cpp b/core/io/stream_peer_ssl.cpp
index a936791561..639d848110 100644
--- a/core/io/stream_peer_ssl.cpp
+++ b/core/io/stream_peer_ssl.cpp
@@ -57,10 +57,10 @@ bool StreamPeerSSL::is_available() {
void StreamPeerSSL::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("accept:Error","stream:StreamPeer"),&StreamPeerSSL::accept);
- ObjectTypeDB::bind_method(_MD("connect:Error","stream:StreamPeer","validate_certs","for_hostname"),&StreamPeerSSL::connect,DEFVAL(false),DEFVAL(String()));
- ObjectTypeDB::bind_method(_MD("get_status"),&StreamPeerSSL::get_status);
- ObjectTypeDB::bind_method(_MD("disconnect"),&StreamPeerSSL::disconnect);
+ ClassDB::bind_method(_MD("accept:Error","stream:StreamPeer"),&StreamPeerSSL::accept);
+ ClassDB::bind_method(_MD("connect:Error","stream:StreamPeer","validate_certs","for_hostname"),&StreamPeerSSL::connect,DEFVAL(false),DEFVAL(String()));
+ ClassDB::bind_method(_MD("get_status"),&StreamPeerSSL::get_status);
+ ClassDB::bind_method(_MD("disconnect"),&StreamPeerSSL::disconnect);
BIND_CONSTANT( STATUS_DISCONNECTED );
BIND_CONSTANT( STATUS_CONNECTED );
BIND_CONSTANT( STATUS_ERROR_NO_CERTIFICATE );
diff --git a/core/io/stream_peer_ssl.h b/core/io/stream_peer_ssl.h
index 2e9ba52644..b36534fcfa 100644
--- a/core/io/stream_peer_ssl.h
+++ b/core/io/stream_peer_ssl.h
@@ -32,7 +32,7 @@
#include "io/stream_peer.h"
class StreamPeerSSL : public StreamPeer {
- OBJ_TYPE(StreamPeerSSL,StreamPeer);
+ GDCLASS(StreamPeerSSL,StreamPeer);
public:
typedef void (*LoadCertsFromMemory)(const ByteArray& p_certs);
diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp
index 52cc11a4a4..2218057cf7 100644
--- a/core/io/stream_peer_tcp.cpp
+++ b/core/io/stream_peer_tcp.cpp
@@ -52,13 +52,13 @@ void StreamPeerTCP::set_ip_type(IP::Type p_type) {
void StreamPeerTCP::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&StreamPeerTCP::set_ip_type);
- ObjectTypeDB::bind_method(_MD("connect","host","port"),&StreamPeerTCP::_connect);
- ObjectTypeDB::bind_method(_MD("is_connected"),&StreamPeerTCP::is_connected);
- ObjectTypeDB::bind_method(_MD("get_status"),&StreamPeerTCP::get_status);
- ObjectTypeDB::bind_method(_MD("get_connected_host"),&StreamPeerTCP::get_connected_host);
- ObjectTypeDB::bind_method(_MD("get_connected_port"),&StreamPeerTCP::get_connected_port);
- ObjectTypeDB::bind_method(_MD("disconnect"),&StreamPeerTCP::disconnect);
+ ClassDB::bind_method(_MD("set_ip_type","ip_type"),&StreamPeerTCP::set_ip_type);
+ ClassDB::bind_method(_MD("connect","host","port"),&StreamPeerTCP::_connect);
+ ClassDB::bind_method(_MD("is_connected"),&StreamPeerTCP::is_connected);
+ ClassDB::bind_method(_MD("get_status"),&StreamPeerTCP::get_status);
+ ClassDB::bind_method(_MD("get_connected_host"),&StreamPeerTCP::get_connected_host);
+ ClassDB::bind_method(_MD("get_connected_port"),&StreamPeerTCP::get_connected_port);
+ ClassDB::bind_method(_MD("disconnect"),&StreamPeerTCP::disconnect);
BIND_CONSTANT( STATUS_NONE );
BIND_CONSTANT( STATUS_CONNECTING );
diff --git a/core/io/stream_peer_tcp.h b/core/io/stream_peer_tcp.h
index abc5947fff..8f6dfaf3f8 100644
--- a/core/io/stream_peer_tcp.h
+++ b/core/io/stream_peer_tcp.h
@@ -36,7 +36,7 @@
class StreamPeerTCP : public StreamPeer {
- OBJ_TYPE( StreamPeerTCP, StreamPeer );
+ GDCLASS( StreamPeerTCP, StreamPeer );
OBJ_CATEGORY("Networking");
public:
diff --git a/core/io/tcp_server.cpp b/core/io/tcp_server.cpp
index 431b17321b..751dfbadca 100644
--- a/core/io/tcp_server.cpp
+++ b/core/io/tcp_server.cpp
@@ -61,11 +61,11 @@ void TCP_Server::set_ip_type(IP::Type p_type) {
void TCP_Server::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&TCP_Server::set_ip_type);
- ObjectTypeDB::bind_method(_MD("listen","port","accepted_hosts"),&TCP_Server::_listen,DEFVAL(DVector<String>()));
- ObjectTypeDB::bind_method(_MD("is_connection_available"),&TCP_Server::is_connection_available);
- ObjectTypeDB::bind_method(_MD("take_connection"),&TCP_Server::take_connection);
- ObjectTypeDB::bind_method(_MD("stop"),&TCP_Server::stop);
+ ClassDB::bind_method(_MD("set_ip_type","ip_type"),&TCP_Server::set_ip_type);
+ ClassDB::bind_method(_MD("listen","port","accepted_hosts"),&TCP_Server::_listen,DEFVAL(DVector<String>()));
+ ClassDB::bind_method(_MD("is_connection_available"),&TCP_Server::is_connection_available);
+ ClassDB::bind_method(_MD("take_connection"),&TCP_Server::take_connection);
+ ClassDB::bind_method(_MD("stop"),&TCP_Server::stop);
}
diff --git a/core/io/tcp_server.h b/core/io/tcp_server.h
index 14153a3324..5fd65575f6 100644
--- a/core/io/tcp_server.h
+++ b/core/io/tcp_server.h
@@ -35,7 +35,7 @@
class TCP_Server : public Reference {
- OBJ_TYPE( TCP_Server, Reference );
+ GDCLASS( TCP_Server, Reference );
protected:
IP::Type ip_type;
diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp
index 9e194d1053..0322f23056 100644
--- a/core/io/xml_parser.cpp
+++ b/core/io/xml_parser.cpp
@@ -379,23 +379,23 @@ Error XMLParser::seek(uint64_t p_pos) {
void XMLParser::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("read"),&XMLParser::read);
- ObjectTypeDB::bind_method(_MD("get_node_type"),&XMLParser::get_node_type);
- ObjectTypeDB::bind_method(_MD("get_node_name"),&XMLParser::get_node_name);
- ObjectTypeDB::bind_method(_MD("get_node_data"),&XMLParser::get_node_data);
- ObjectTypeDB::bind_method(_MD("get_node_offset"),&XMLParser::get_node_offset);
- ObjectTypeDB::bind_method(_MD("get_attribute_count"),&XMLParser::get_attribute_count);
- ObjectTypeDB::bind_method(_MD("get_attribute_name","idx"),&XMLParser::get_attribute_name);
- ObjectTypeDB::bind_method(_MD("get_attribute_value","idx"),(String (XMLParser::*)(int) const) &XMLParser::get_attribute_value);
- ObjectTypeDB::bind_method(_MD("has_attribute","name"),&XMLParser::has_attribute);
- ObjectTypeDB::bind_method(_MD("get_named_attribute_value","name"), (String (XMLParser::*)(const String&) const) &XMLParser::get_attribute_value);
- ObjectTypeDB::bind_method(_MD("get_named_attribute_value_safe","name"), &XMLParser::get_attribute_value_safe);
- ObjectTypeDB::bind_method(_MD("is_empty"),&XMLParser::is_empty);
- ObjectTypeDB::bind_method(_MD("get_current_line"),&XMLParser::get_current_line);
- ObjectTypeDB::bind_method(_MD("skip_section"),&XMLParser::skip_section);
- ObjectTypeDB::bind_method(_MD("seek","pos"),&XMLParser::seek);
- ObjectTypeDB::bind_method(_MD("open","file"),&XMLParser::open);
- ObjectTypeDB::bind_method(_MD("open_buffer","buffer"),&XMLParser::open_buffer);
+ ClassDB::bind_method(_MD("read"),&XMLParser::read);
+ ClassDB::bind_method(_MD("get_node_type"),&XMLParser::get_node_type);
+ ClassDB::bind_method(_MD("get_node_name"),&XMLParser::get_node_name);
+ ClassDB::bind_method(_MD("get_node_data"),&XMLParser::get_node_data);
+ ClassDB::bind_method(_MD("get_node_offset"),&XMLParser::get_node_offset);
+ ClassDB::bind_method(_MD("get_attribute_count"),&XMLParser::get_attribute_count);
+ ClassDB::bind_method(_MD("get_attribute_name","idx"),&XMLParser::get_attribute_name);
+ ClassDB::bind_method(_MD("get_attribute_value","idx"),(String (XMLParser::*)(int) const) &XMLParser::get_attribute_value);
+ ClassDB::bind_method(_MD("has_attribute","name"),&XMLParser::has_attribute);
+ ClassDB::bind_method(_MD("get_named_attribute_value","name"), (String (XMLParser::*)(const String&) const) &XMLParser::get_attribute_value);
+ ClassDB::bind_method(_MD("get_named_attribute_value_safe","name"), &XMLParser::get_attribute_value_safe);
+ ClassDB::bind_method(_MD("is_empty"),&XMLParser::is_empty);
+ ClassDB::bind_method(_MD("get_current_line"),&XMLParser::get_current_line);
+ ClassDB::bind_method(_MD("skip_section"),&XMLParser::skip_section);
+ ClassDB::bind_method(_MD("seek","pos"),&XMLParser::seek);
+ ClassDB::bind_method(_MD("open","file"),&XMLParser::open);
+ ClassDB::bind_method(_MD("open_buffer","buffer"),&XMLParser::open_buffer);
BIND_CONSTANT( NODE_NONE );
BIND_CONSTANT( NODE_ELEMENT );
diff --git a/core/io/xml_parser.h b/core/io/xml_parser.h
index e1f059bf8c..7f80751156 100644
--- a/core/io/xml_parser.h
+++ b/core/io/xml_parser.h
@@ -40,7 +40,7 @@
class XMLParser : public Reference {
- OBJ_TYPE( XMLParser, Reference );
+ GDCLASS( XMLParser, Reference );
public:
//! Enumeration of all supported source text file formats
enum SourceFormat {