Page MenuHomec4science

describable.cpp
No OneTemporary

File Metadata

Created
Wed, Dec 4, 22:22

describable.cpp

#include "specs/describable.h"
#include "descriptor.h"
#include <QString>
#include "skerror.h"
using namespace symkit;
Describable::Describable(Descriptor *desc)
: descriptor(desc)
{
}
Describable::~Describable()
{
release();
}
void Describable::bind(Descriptor * desc)
{
if (!desc)
throw SKError(ERR_NULL_POINTER,
"bindDescriptor",
"symgraph.Descriptable",
"Cannot bind a null pointer as descriptor");
descriptor = desc;
}
void Describable::release()
{
descriptor = 0;
}
bool Describable::isBound() const
{
return descriptor != 0;
}
Descriptor * Describable::getDescriptor()
{
return descriptor;
}
void Describable::updateDescriptor(float dt)
{
descriptor->update(dt);
}

Event Timeline