<commit_before>#pragma once
#include <boost/date_time/gregorian/gregorian.hpp>
#include <vector>
#include <bitset>

#include <boost/date_time/gregorian/greg_serialize.hpp>
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/bitset.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/bimap.hpp>

#include <boost/geometry.hpp>
#include <boost/geometry/geometries/register/point.hpp>
#include <boost/geometry/geometries/register/linestring.hpp>
#include <boost/geometry/geometries/polygon.hpp>


namespace mpl = boost::mpl;

namespace navitia { namespace type {
typedef uint32_t idx_t;

const idx_t invalid_idx = std::numeric_limits<idx_t>::max();

// Types qui sont exclus : JourneyPatternPointConnection
#define ITERATE_NAVITIA_PT_TYPES(FUN)\
    FUN(ValidityPattern, validity_patterns)\
    FUN(Line, lines)\
    FUN(JourneyPattern, journey_patterns)\
    FUN(VehicleJourney, vehicle_journeys)\
    FUN(StopPoint, stop_points)\
    FUN(StopArea, stop_areas)\
    FUN(Network, networks)\
    FUN(PhysicalMode, physical_modes)\
    FUN(CommercialMode, commercial_modes)\
    FUN(Connection, connections)\
    FUN(JourneyPatternPoint, journey_pattern_points)\
    FUN(Company, companies)\
    FUN(Route, routes)

enum class Type_e {
    ValidityPattern = 0,
    Line = 1,
    JourneyPattern = 2,
    VehicleJourney = 3,
    StopPoint = 4,
    StopArea = 5,
    Network = 7,
    PhysicalMode = 8,
    CommercialMode = 9,
    Connection = 11,
    JourneyPatternPoint = 12,
    Company = 15,   
    Route = 23,
    POI = 24,

    // Objets spéciaux qui ne font pas partie du référentiel TC
    eStopTime = 6,
    Address = 22,
    Coord = 20,
    Unknown = 18,
    Way = 19,
    Admin=21
};
struct PT_Data;
template<class T> std::string T::* name_getter(){return &T::name;}
template<class T> int T::* idx_getter(){return &T::idx;}


struct Nameable{
    std::string name;
    std::string comment;
};


struct Header{
    std::string id;
    idx_t idx;
    std::string uri;
    Header() : idx(invalid_idx){}
    std::vector<idx_t> get(Type_e, const PT_Data &) const {return std::vector<idx_t>();}

};


typedef std::bitset<7> Properties;
struct hasProperties {
    static const uint8_t WHEELCHAIR_BOARDING = 0;<commit_msg>Ajout d'un attribut visible dans le structure Nameable<commit_after>#pragma once
#include <boost/date_time/gregorian/gregorian.hpp>
#include <vector>
#include <bitset>

#include <boost/date_time/gregorian/greg_serialize.hpp>
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/bitset.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/bimap.hpp>

#include <boost/geometry.hpp>
#include <boost/geometry/geometries/register/point.hpp>
#include <boost/geometry/geometries/register/linestring.hpp>
#include <boost/geometry/geometries/polygon.hpp>


namespace mpl = boost::mpl;

namespace navitia { namespace type {
typedef uint32_t idx_t;

const idx_t invalid_idx = std::numeric_limits<idx_t>::max();

// Types qui sont exclus : JourneyPatternPointConnection
#define ITERATE_NAVITIA_PT_TYPES(FUN)\
    FUN(ValidityPattern, validity_patterns)\
    FUN(Line, lines)\
    FUN(JourneyPattern, journey_patterns)\
    FUN(VehicleJourney, vehicle_journeys)\
    FUN(StopPoint, stop_points)\
    FUN(StopArea, stop_areas)\
    FUN(Network, networks)\
    FUN(PhysicalMode, physical_modes)\
    FUN(CommercialMode, commercial_modes)\
    FUN(Connection, connections)\
    FUN(JourneyPatternPoint, journey_pattern_points)\
    FUN(Company, companies)\
    FUN(Route, routes)

enum class Type_e {
    ValidityPattern = 0,
    Line = 1,
    JourneyPattern = 2,
    VehicleJourney = 3,
    StopPoint = 4,
    StopArea = 5,
    Network = 7,
    PhysicalMode = 8,
    CommercialMode = 9,
    Connection = 11,
    JourneyPatternPoint = 12,
    Company = 15,   
    Route = 23,
    POI = 24,

    // Objets spéciaux qui ne font pas partie du référentiel TC
    eStopTime = 6,
    Address = 22,
    Coord = 20,
    Unknown = 18,
    Way = 19,
    Admin=21
};
struct PT_Data;
template<class T> std::string T::* name_getter(){return &T::name;}
template<class T> int T::* idx_getter(){return &T::idx;}


struct Nameable{
    std::string name;
    std::string comment;
    bool visible;
    Nameable():visible(true){}
};


struct Header{
    std::string id;
    idx_t idx;
    std::string uri;
    Header() : idx(invalid_idx){}
    std::vector<idx_t> get(Type_e, const PT_Data &) const {return std::vector<idx_t>();}

};


typedef std::bitset<7> Properties;
struct hasProperties {
    static const uint8_t WHEELCHAIR_BOARDING = 0;
{'fraction_non_alphanumeric': 0.1214376860910251, 'fraction_numerical': 0.014887282007656316, 'mean_word_length': 4.117519042437432, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5242870', 'n_tokens_mistral': 1694, 'n_tokens_neox': 1604, 'n_words': 357}