Commit f4f103d1 authored by ahoms's avatar ahoms
Browse files

* implemented getCapOfType method


git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@18 45c4679d-1946-429d-baad-37912b19538b
parent 5c1bf698
...@@ -39,7 +39,7 @@ class HwInterface ...@@ -39,7 +39,7 @@ class HwInterface
HwInterface(); HwInterface();
virtual ~HwInterface(); virtual ~HwInterface();
const HwCap *getCapOfType(HwCap::Type cap_type); const HwCap *getCapOfType(HwCap::Type cap_type) const;
virtual const CapList& getCapList() const = 0; virtual const CapList& getCapList() const = 0;
virtual void reset(ResetLevel reset_level) = 0; virtual void reset(ResetLevel reset_level) = 0;
......
...@@ -9,3 +9,15 @@ HwInterface::HwInterface() ...@@ -9,3 +9,15 @@ HwInterface::HwInterface()
HwInterface::~HwInterface() HwInterface::~HwInterface()
{ {
} }
const HwCap *HwInterface::getCapOfType(HwCap::Type cap_type) const
{
const CapList& cap_list = getCapList();
typedef CapList::const_iterator It;
for (It i = cap_list.begin(); i != cap_list.end(); ++i)
if (i->getType() == cap_type)
return &(*i);
return NULL;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment