C++ (Cpp) visitor_info Example

Introduction

The c++ (cpp) visitor_info example is extracted from the most popular open source projects, you can refer to the following example for usage.

Programming language: C++ (Cpp)

Class/type: visitor_info

Example#1

std::size_t visitor_info_hasher::hash(const visitor_info&v) {
    std::size_t seed(0);

    combine(seed, dynamic_cast<const dogen::cpp::entity&>(v));

    combine(seed, v.name());
    combine(seed, hash_std_list_std_string(v.types()));
    combine(seed, hash_std_list_std_string(v.namespaces()));

    return seed;
}

Example#2
File: visitor_info_hash.cppProject: pgannon/dogen

std::size_t visitor_info_hasher::hash(const visitor_info& v) {
    std::size_t seed(0);

    combine(seed, dynamic_cast<const dogen::cpp::formattables::entity&>(v));

    combine(seed, hash_std_list_dogen_cpp_formattables_visited_type_info(v.types()));
    return seed;
}