- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
template <typename T> std::list<T*> GetComponents(){
std::list<T*> list;
std::list<Component_ptr>::iterator iter=_components.begin();
while(iter!=_components.end()){
T* element=dynamic_cast<T*>(iter->get());
if(element!=NULL){
list.push_back(element);
}
iter++;
}
return list;
}
template <typename T> T* GetComponent(){
std::list<T*> list=GetComponents<T>();
if(list.size()>0){
return list.front();
}
return NULL;
}
guestinho 11.02.2017 23:54 # 0
guestinho 12.02.2017 00:22 # +1
bormand 12.02.2017 05:46 # 0
Odin 03.11.2018 17:26 # 0
Antervis 13.02.2017 04:37 # +1
Psionic 24.02.2017 22:45 # +1
Antervis 25.02.2017 08:08 # +1
Psionic 25.02.2017 09:32 # 0
bormand 25.02.2017 10:00 # −1
Psionic 25.02.2017 18:47 # +1
guest8 03.11.2018 17:43 # −999