/*
 * container.cpp
 *
 *  Created on: 26.5.2011
 *      Author: petr
 */

#include "container.h"

GlobalContainer Container::globalList = GlobalContainer();

int Container::objectLoads(string objectType, string id) {
	if (Container::globalList.find(objectType + "_" + id) == Container::globalList.end())
		return 0;
	else
		return 1;
}

void Container::insertGlobalObject(string objectType, string id, Item *object) {
	Container::globalList[objectType + "_" + id] = object;
}

void Container::insertObject(Item *object) {
	localList.push_back(object);
}

void Container::truncateList() {
	localList.clear();
}
