openfpga/src/utils/pb_type_utils.cpp
/************************************************************************ 
 * With a given pb_type name, find the pb_type pointer
 ************************************************************************/
With a given pb_type name, find the pb_type pointer
With a given pb_type name find the pb_type pointer
t_pb_type* find_mode_child_pb_type(t_mode* mode, const char* child_name) {
  for (int i = 0; i < mode->num_pb_type_children; ++i) {
    if (std::string(child_name) == std::string(mode->pb_type_children[i].name)) {
       return &(mode->pb_type_children[i]);
    }
  }
  return nullptr;
}
t_pb_type * find_mode_child_pb_type ( t_mode * mode , const char * child_name ) { for ( int i = 0 ; i < mode -> num_pb_type_children ; ++ i ) { if ( std :: string ( child_name ) == std :: string ( mode -> pb_type_children [ i ] . name ) ) { return & ( mode -> pb_type_children [ i ] ) ; } } return nullptr ; }
With a given pb_type name, find the pb_type pointer
With a given pb_type name find the pb_type pointer
/* Note found, return a nullptr */