use of nars.io.events.EventEmitter in project opennars by opennars.
the class NAR method LoadFromFile.
public static NAR LoadFromFile(String name) throws FileNotFoundException, IOException, ClassNotFoundException {
FileInputStream inStream = new FileInputStream(name);
ObjectInputStream stream = new ObjectInputStream(inStream);
NAR ret = (NAR) stream.readObject();
ret.memory.event = new EventEmitter();
ret.plugins = new ArrayList<>();
for (Operator o : Operators.get(ret)) ret.memory.addOperator(o);
new Plugins().init(ret);
return ret;
}
Aggregations