Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

model.cc

Go to the documentation of this file.
00001 #include "model.h"
00002 #include "keygroup.h"
00003 #include "object.h"
00004 
00005 model::model(int ID) : id(ID), generation(0), keygroups(), O(NULL), name("model_unnamed") {}
00006 
00007 void model::setName(const std::string& Name){ name = Name; }
00008 
00009 const std::string& model::getName() const { return name; }
00010 
00011 int model::getID() const { return id; }
00012 
00013 void model::writeToFile(std::ofstream& outfile){
00014   outfile << id << std::endl;
00015   outfile << O->getID() << std::endl;
00016   outfile << generation << std::endl;
00017   outfile << name << std::endl;
00018   outfile << keygroups.size() << std::endl;
00019   for (size_t i = 0; i < keygroups.size(); i++){
00020     outfile << keygroups[i]->getID() << "\t";
00021   }
00022   outfile << std::endl;
00023 }
00024 

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:45 2016 by Doxygen 1.6.3