#include "book.hpp" #include #include #include "../mwworld/ptr.hpp" #include "containerutil.hpp" namespace MWClass { std::string Book::getName (const MWWorld::Ptr& ptr) const { ESMS::LiveCellRef *ref = ptr.get(); return ref->base->name; } void Book::insertIntoContainer (const MWWorld::Ptr& ptr, MWWorld::ContainerStore& containerStore) const { insertIntoContainerStore (ptr, containerStore.books); } std::string Book::getScript (const MWWorld::Ptr& ptr) const { ESMS::LiveCellRef *ref = ptr.get(); return ref->base->script; } void Book::registerSelf() { boost::shared_ptr instance (new Book); registerClass (typeid (ESM::Book).name(), instance); } }