ClassModel.cpp
Go to the documentation of this file.
00001 /*
00002  * ObjectModel.cpp
00003  *
00004  *  Created on: Mar 18, 2011
00005  *      Author: sdries
00006  */
00007 
00008 #include "wire/core/ClassModel.h"
00009 #include "wire/core/Property.h"
00010 
00011 using namespace std;
00012 
00013 namespace mhf {
00014 
00015 ClassModel::ClassModel(const std::string& model_name) : model_name_(model_name) {
00016 
00017 }
00018 
00019 ClassModel::ClassModel(const ClassModel& orig)
00020     : new_pdfs_(orig.new_pdfs_), clutter_pdfs_(orig.clutter_pdfs_), estimators_(orig.estimators_),
00021       model_name_(orig.model_name_) {
00022 }
00023 
00024 ClassModel::~ClassModel() {
00025 
00026 }
00027 
00028 void ClassModel::setNewPDF(const Attribute& attribute, const pbl::PDF& pdf) {
00029     new_pdfs_.addProperty(attribute, pdf);
00030 }
00031 
00032 void ClassModel::setClutterPDF(const Attribute& attribute, const pbl::PDF& pdf) {
00033     clutter_pdfs_.addProperty(attribute, pdf);
00034 }
00035 
00036 void ClassModel::setEstimator(const Attribute& attribute, const IStateEstimator& estimator) {
00037     estimators_.addProperty(attribute, estimator);
00038 }
00039 
00040 void ClassModel::setModelName(const std::string& name)  {
00041     model_name_ = name;
00042 }
00043 
00044 const std::string& ClassModel::getModelName() const {
00045     return model_name_;
00046 }
00047 
00048 const IStateEstimator* ClassModel::getEstimator(const Attribute& attribute) const {
00049     const Property* prop = estimators_.getProperty(attribute);
00050     if (prop) {
00051         return &prop->getEstimator();
00052     }
00053     return 0;
00054 }
00055 
00056 const PropertySet& ClassModel::getNewPDFs() const {
00057     return new_pdfs_;
00058 }
00059 
00060 const PropertySet& ClassModel::getClutterPDFs() const {
00061     return clutter_pdfs_;
00062 }
00063 
00064 }


wire_core
Author(s): Sjoerd van den Dries, Jos Elfring
autogenerated on Tue Jan 7 2014 11:43:19