name storing system, implementation (2/2)
[quarnos.git] / manes / order.cpp
blob0f3bc3e46160c8fbf0f1fdf48ea388d00bf25f4a
1 #include "resource_order.h"
2 #include "resource_type.h"
3 #include "resource_manager.h"
5 #include "libs/string.h"
7 using namespace resources;
9 resource_order::resource_order(const char *type_name) : base((resource_type*)GET_RESOURCES()->get_type(type_name)) {}
11 void resource_order::set_command(const char *data) {
12 command = new char[strlen(data)];
13 strcpy(command, data);
14 //datas.clean();
17 const char *resource_order::get_command() const {
18 return command;
21 bool resource_order::check_type(resource_type *_type) const {
22 return *_type == *base;
26 int resource_order::get_size(int index) {
27 int ptr = arg_size[index];
28 return ptr;