Ejemplo n.º 1
0
    bool table::is_column(const std::string& column_name,
                          const std::type_info& type) const
    {
        assert(has_column(column_name));

        const auto& c = m_columns.at(column_name);
        assert(c->type_hash());
        return (*c->type_hash()) == type.hash_code();
    }
Ejemplo n.º 2
0
std::pair<size_t,size_t> 
fnc_registry::lookup_location(const std::type_info& t_info ) {
    auto tid = t_info.hash_code();
    for (size_t i = 0; i < impl->registry[tid].size(); i++) {
        if (std::type_index(t_info) == impl->registry[tid][i].first) {
            return {tid, i};
        }
    }
    TLASSERT(false);
    return {0, 0};
}
Ejemplo n.º 3
0
 size_t lookupElemType(const std::type_info &type) const
 {
     try
     {
         return _typeHashToElemType.at(type.hash_code());
     }
     catch (const std::exception &)
     {
         throw Pothos::DTypeUnknownError("Pothos::DType("+Pothos::Util::typeInfoToString(type)+")", "unsupported element type");
     }
 }
Ejemplo n.º 4
0
void fnc_registry::insert(const std::type_info& t_info, void* f_ptr) {
    auto tid = t_info.hash_code();
    impl->registry[tid].push_back({std::type_index(t_info), f_ptr});
}