Commit 7f846639 authored by Ilya Prokhorov's avatar Ilya Prokhorov

Shortcut for objects context

parent 685f8cee
......@@ -50,6 +50,14 @@ void FSEGTObjectsContext::removeAllObjects()
}
}
shared_ptr<Object> FSEGTObjectsContext::objectAtIndex(int index) {
return objects->objectAtIndex(index);
}
int FSEGTObjectsContext::size() {
return objects->size();
}
void FSEGTObjectsContext::addObject(shared_ptr<Object> object)
{
......
......@@ -30,6 +30,9 @@ public:
shared_ptr<Object> objectWithInstanceIdentifier(shared_ptr<string> instanceIdentifier);
shared_ptr<Object> objectAtIndex(int index);
int size();
void setObjects(shared_ptr<Objects> objects);
void removeAllObjects();
......@@ -42,7 +45,6 @@ public:
void unsubscribe(shared_ptr<FSEGTObjectContextDelegate> delegate);
private:
vector<shared_ptr<FSEGTObjectContextDelegate> > subscribers;
shared_ptr<Objects> objects;
......
#include <FlameSteelEngineGameToolkit/Controllers/FSEGTObjectsContext.h>
namespace FlameSteelEngine {
namespace GameToolkit {
using ObjectsContext = FSEGTObjectsContext;
};
};
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment