]> git.tdb.fi Git - r2c2.git/commitdiff
Rework article numbers
authorMikko Rasa <tdb@tdb.fi>
Sun, 4 May 2014 19:10:34 +0000 (22:10 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 4 May 2014 21:15:26 +0000 (00:15 +0300)
20 files changed:
locos.dat
source/designer/extendtool.cpp
source/libr2c2/articlenumber.cpp
source/libr2c2/articlenumber.h
source/libr2c2/beamgatetype.cpp
source/libr2c2/catalogue.cpp
source/libr2c2/catalogue.h
source/libr2c2/objecttype.cpp
source/libr2c2/objecttype.h
source/libr2c2/signaltype.cpp
source/libr2c2/signaltype.h
source/libr2c2/terraintype.cpp
source/libr2c2/terraintype.h
source/libr2c2/tracktype.cpp
source/libr2c2/tracktype.h
source/libr2c2/vehicletype.cpp
source/libr2c2/vehicletype.h
terrain.dat
tracks.dat
wagons.dat

index bd3fdc2f9116d0c9f9e0b07584c3ac3b1bb0fb01..f330a818eedf485a81c2fab6ee20e9031d77fce7 100644 (file)
--- a/locos.dat
+++ b/locos.dat
@@ -2,6 +2,11 @@ scale 1 87;
 
 vehicle "39230"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "39230";
+       };
        name "BR 23";
        locomotive true;
        function 0 "light";
@@ -33,6 +38,12 @@ vehicle "39230"
 
 vehicle "29820-02"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "29820";
+               part "02";
+       };
        name "BR 50";
        locomotive true;
        function 0 "light";
@@ -284,6 +295,12 @@ vehicle "29820-02"
 
 vehicle "29530-01"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "29530";
+               part "01";
+       };
        name "BR 86";
        locomotive true;
        function 0 "light";
@@ -315,6 +332,11 @@ vehicle "29530-01"
 
 vehicle "36850"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "36850";
+       };
        name "BR 185";
        locomotive true;
        function 0 "light";
@@ -345,6 +367,12 @@ vehicle "36850"
 
 vehicle "37225-02"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "37225";
+               part "02";
+       };
        name "BR 194";
        locomotive true;
        function 0 "light";
@@ -379,6 +407,11 @@ vehicle "37225-02"
 
 vehicle "39410"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "39410";
+       };
        name "BR E 41";
        locomotive true;
        function 0 "light";
@@ -412,6 +445,12 @@ vehicle "39410"
 
 vehicle "37574-01"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "37574";
+               part "01";
+       };
        name "BR E 03";
        locomotive true;
        function 0 "light";
@@ -448,6 +487,11 @@ vehicle "37574-01"
 vehicle "37504"
 {
        // XXX The power car is really in the middle, but that configuration isn't supported yet
+       article_number
+       {
+               vendor "Märklin";
+               article "37504";
+       };
        name "BR 420 S-bahn";
        locomotive true;
        function 0 "light";
@@ -482,6 +526,11 @@ vehicle "37504"
 
 vehicle "37851"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "37851";
+       };
        name "BR 150";
        locomotive true;
        function 0 "light";
@@ -514,6 +563,11 @@ vehicle "37851"
 
 vehicle "37968"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "37968";
+       };
        name "BR 96";
        locomotive true;
        function 0 "light";
index c31c09f951149429182609d3ecaa7d9dd09aef27..8698fd52e6aabc048b348d49b796a06c236fb3e2 100644 (file)
@@ -143,20 +143,20 @@ void ExtendTool::pointer_motion()
                                delete *i;
                        extend_tracks = trks;
 
-                       map<ArticleNumber, unsigned> counts;
+                       map<const TrackType *, unsigned> counts;
                        length = 0;
                        for(vector<Track *>::iterator i=extend_tracks.begin(); i!=extend_tracks.end(); ++i)
                        {
                                length += (*i)->get_type().get_total_length();
-                               ++counts[(*i)->get_type().get_article_number()];
+                               ++counts[&(*i)->get_type()];
                        }
 
                        string detail;
-                       for(map<ArticleNumber, unsigned>::const_iterator i=counts.begin(); i!=counts.end(); ++i)
+                       for(map<const TrackType *, unsigned>::const_iterator i=counts.begin(); i!=counts.end(); ++i)
                        {
                                if(!detail.empty())
                                        detail += ", ";
-                               detail += format("%dx %s", i->second, i->first);
+                               detail += format("%dx %s", i->second, i->first->get_article_number());
                        }
 
                        signal_status.emit(format("Extend: %.0fmm (%s)", length*1000, detail));
index dd19eb5710e1ab0b7d1d719ef0969b1545cdd08f..d8028310daca1085b64da61a68b8b1debe25489d 100644 (file)
@@ -6,75 +6,44 @@ using namespace Msp;
 
 namespace R2C2 {
 
-ArticleNumber::ArticleNumber(unsigned n)
-{
-       Part part;
-       part.number = n;
-       part.letter = 0;
-       parts.push_back(part);
-}
-
-ArticleNumber::ArticleNumber(const string &s)
-{
-       vector<string> sparts = split(s, '-');
-       for(vector<string>::iterator i=sparts.begin(); i!=sparts.end(); ++i)
-       {
-               if(i->empty())
-                       throw invalid_argument("ArticleNumber::ArticleNumber");
+ArticleNumber::ArticleNumber(const string &a):
+       article(a)
+{ }
 
-               unsigned nondigit = i->size();
-               for(unsigned j=0; j<i->size(); ++j)
-                       if(!isdigit((*i)[j]))
-                       {
-                               nondigit = j;
-                               break;
-                       }
-
-               if(!nondigit || nondigit<i->size()-1)
-                       throw invalid_argument("ArticleNumber::ArticleNumber");
-
-               Part part;
-               part.number = lexical_cast<unsigned>(i->substr(0, nondigit));
-               part.letter = nondigit<i->size() ? (*i)[nondigit] : 0;
-               parts.push_back(part);
-       }
-}
+ArticleNumber::ArticleNumber(const string &v, const string &a, const string &p):
+       vendor(v),
+       article(a),
+       part(p)
+{ }
 
 string ArticleNumber::str() const
 {
        string result;
-       for(vector<Part>::const_iterator i=parts.begin(); i!=parts.end(); ++i)
+       if(!vendor.empty())
        {
-               if(!result.empty())
-                       result += '-';
-
-               result += lexical_cast<string>(i->number);
-               if(i->letter)
-                       result += i->letter;
+               result += vendor;
+               result += ' ';
+       }
+       result += article;
+       if(!part.empty())
+       {
+               result += '-';
+               result += part;
        }
 
        return result;
 }
 
-bool ArticleNumber::operator<(const ArticleNumber &other) const
-{
-       return parts<other.parts;
-}
 
-
-bool ArticleNumber::Part::operator<(const Part &other) const
+ArticleNumber::Loader::Loader(ArticleNumber &an):
+       DataFile::ObjectLoader<ArticleNumber>(an)
 {
-       if(number!=other.number)
-               return number<other.number;
-       return letter<other.letter;
+       add("vendor", &ArticleNumber::vendor);
+       add("article", &ArticleNumber::article);
+       add("part", &ArticleNumber::part);
 }
 
 
-void operator>>(const LexicalConverter &conv, ArticleNumber &art_nr)
-{
-       art_nr = ArticleNumber(conv.get());
-}
-
 void operator<<(LexicalConverter &conv, const ArticleNumber &art_nr)
 {
        conv.result(art_nr.str());
index c4939674991b69e865017c7c7fc5ab3c09d362b2..79356c88b7008be05e8fa8cdeb76267a531a4289 100644 (file)
@@ -3,34 +3,36 @@
 
 #include <string>
 #include <vector>
+#include <msp/datafile/objectloader.h>
 #include <msp/strings/lexicalcast.h>
 
 namespace R2C2 {
 
 class ArticleNumber
 {
-private:
-       struct Part
+public:
+       class Loader: public Msp::DataFile::ObjectLoader<ArticleNumber>
        {
-               unsigned number;
-               char letter;
-
-               bool operator<(const Part &) const;
+       public:
+               Loader(ArticleNumber &);
        };
 
-       std::vector<Part> parts;
+private:
+       std::string vendor;
+       std::string article;
+       std::string part;
 
 public:
        ArticleNumber() { }
-       ArticleNumber(unsigned);
        ArticleNumber(const std::string &);
+       ArticleNumber(const std::string &, const std::string &, const std::string & = std::string());
 
+       const std::string &get_vendor() const { return vendor; }
+       const std::string &get_article() const { return article; }
+       const std::string &get_part() const { return part; }
        std::string str() const;
-
-       bool operator<(const ArticleNumber &) const;
 };
 
-void operator>>(const Msp::LexicalConverter &, ArticleNumber &);
 void operator<<(Msp::LexicalConverter &, const ArticleNumber &);
 
 } // namespace R2C2
index 46f0aad652b09da61b19b7a6860a6f92c107da88..a89851c05adabf68937451f961a203d20e9df96b 100644 (file)
@@ -8,8 +8,7 @@ using namespace Msp;
 
 namespace R2C2 {
 
-BeamGateType::BeamGateType():
-       ObjectType(ArticleNumber(0))
+BeamGateType::BeamGateType()
 {
        name = "Beam gate";
        Geometry::TransformedShape<float, 3> box1(
index 2afe4eaa14885cee663de30af2475648e9486ab4..a919cb76a64d7ff34a8c780d96122c1140597910 100644 (file)
@@ -16,10 +16,10 @@ Catalogue::Catalogue():
        scale(1),
        layout(*this)
 {
-       add_type<TrackType>();
-       add_type<SignalType>();
-       add_type<VehicleType>();
-       add_type<TerrainType>();
+       add_type<TrackType>().keyword("track");
+       add_type<SignalType>().keyword("signal");
+       add_type<VehicleType>().keyword("vehicle");
+       add_type<TerrainType>().keyword("terrain");
        add_type<TrackAppearance>().keyword("track_appearance");
 }
 
@@ -30,10 +30,6 @@ Catalogue::Loader::Loader(Catalogue &c):
 {
        add("layout", &Loader::layout);
        add("scale", &Loader::scale);
-       add("signal", &Loader::signal);
-       add("terrain", &Loader::terrain);
-       add("track", &Loader::track);
-       add("vehicle", &Loader::vehicle);
 }
 
 void Catalogue::Loader::layout()
@@ -46,36 +42,4 @@ void Catalogue::Loader::scale(float n, float d)
        cat.scale = n/d;
 }
 
-void Catalogue::Loader::signal(const string &n)
-{
-       RefPtr<SignalType> sig = new SignalType(n);
-       load_sub(*sig);
-       cat.add(n, sig.get());
-       sig.release();
-}
-
-void Catalogue::Loader::terrain(const string &n)
-{
-       RefPtr<TerrainType> ter = new TerrainType(n);
-       load_sub(*ter);
-       cat.add(n, ter.get());
-       ter.release();
-}
-
-void Catalogue::Loader::track(const string &n)
-{
-       RefPtr<TrackType> trk = new TrackType(n);
-       load_sub(*trk, cat);
-       cat.add(n, trk.get());
-       trk.release();
-}
-
-void Catalogue::Loader::vehicle(const string &n)
-{
-       RefPtr<VehicleType> veh = new VehicleType(n);
-       load_sub(*veh);
-       cat.add(n, veh.get());
-       veh.release();
-}
-
 } // namespace R2C2
index cd59e9ca2922e06ac723af9f432fbb45de517403..49a4a4d0aabdf49765fa07e733ca9b78f1a76a87 100644 (file)
@@ -24,10 +24,6 @@ public:
        private:
                void layout();
                void scale(float, float);
-               void signal(const std::string &);
-               void terrain(const std::string &);
-               void track(const std::string &);
-               void vehicle(const std::string &);
        };
 
 private:
index 09b25610ef929e57d085a6f00ebe7f1edd5d7611..6d7726f24c384445e756d10e06c156774f69df81 100644 (file)
@@ -4,8 +4,7 @@ using namespace Msp;
 
 namespace R2C2 {
 
-ObjectType::ObjectType(const ArticleNumber &an):
-       art_nr(an),
+ObjectType::ObjectType():
        shape(0)
 { }
 
@@ -18,8 +17,14 @@ ObjectType::~ObjectType()
 ObjectType::Loader::Loader(ObjectType &ot):
        DataFile::ObjectLoader<ObjectType>(ot)
 {
+       add("article_number", &Loader::article_number);
        add("description", &ObjectType::description);
        add("name",        &ObjectType::name);
 }
 
+void ObjectType::Loader::article_number()
+{
+       load_sub(obj.art_nr);
+}
+
 } // namespace R2C2
index 4102f944041ee95f231b9c9924889115e87565fa..59bd879067d59a1fd8f95d319ee928f855a25968 100644 (file)
@@ -15,6 +15,9 @@ public:
        {
        public:
                Loader(ObjectType &);
+
+       private:
+               void article_number();
        };
 
 protected:
@@ -23,7 +26,7 @@ protected:
        std::string description;
        Shape *shape;
 
-       ObjectType(const ArticleNumber &);
+       ObjectType();
 public:
        virtual ~ObjectType();
 
index 545e4de8f253f5a28247838d7627041b0d94f3ad..0ec53cd89e18ddc346d426998cd24dad7e4bf5a2 100644 (file)
@@ -8,8 +8,7 @@ using namespace Msp;
 
 namespace R2C2 {
 
-SignalType::SignalType(const ArticleNumber &an):
-       ObjectType(an)
+SignalType::SignalType()
 {
        shape = new Geometry::TransformedShape<float, 3>(
                Geometry::ExtrudedShape<float, 3>(Geometry::Circle<float>(0.01), 0.12),
index be3857a8da2a7186f6d1d966184813de8680d745..9dac78eacad7dfe45d7ec94944df89788c5e74d3 100644 (file)
@@ -37,7 +37,7 @@ private:
        std::string object;
 
 public:
-       SignalType(const ArticleNumber & = ArticleNumber());
+       SignalType();
 
        const IndicationList &get_indications() const { return indications; }
        const std::string &get_object() const { return object; }
index ce9551feb152551763dc6ed8795b5bc1862e84c5..96d6dcf5d8bd492fb1ce86129460ec32817e56b6 100644 (file)
@@ -6,8 +6,7 @@ using namespace Msp;
 
 namespace R2C2 {
 
-TerrainType::TerrainType(const ArticleNumber &an):
-       ObjectType(an),
+TerrainType::TerrainType():
        tile_size(1),
        elevation_granularity(0.1)
 { }
@@ -28,7 +27,7 @@ TerrainType::SurfaceType::SurfaceType():
 
 
 TerrainType::Loader::Loader(TerrainType &tt):
-       DataFile::ObjectLoader<TerrainType>(tt)
+       DataFile::DerivedObjectLoader<TerrainType, ObjectType::Loader>(tt)
 {
        add("elevation_granularity", &TerrainType::elevation_granularity);
        add("surface", &Loader::surface);
index 8bd59eaf8605d6347739a19543a0b5ac2c4f9c2b..6d26a020a2644d6bd14573147154b993d8789c78 100644 (file)
@@ -9,7 +9,7 @@ namespace R2C2 {
 class TerrainType: public ObjectType
 {
 public:
-       class Loader: public Msp::DataFile::ObjectLoader<TerrainType>
+       class Loader: public Msp::DataFile::DerivedObjectLoader<TerrainType, ObjectType::Loader>
        {
        public:
                Loader(TerrainType &);
@@ -37,7 +37,7 @@ private:
        float elevation_granularity;
 
 public:
-       TerrainType(const ArticleNumber & = ArticleNumber());
+       TerrainType();
 
        unsigned get_n_surface_types() const { return surface_types.size(); }
        const SurfaceType &get_surface_type(unsigned) const;
index 6b16c553809dc7941a9523aac7889ee34f8a4f34..51b685f5ceed7964e54bf6ef26b84b3a83f41a89 100644 (file)
@@ -9,8 +9,7 @@ using namespace Msp;
 
 namespace R2C2 {
 
-TrackType::TrackType(const ArticleNumber &an):
-       ObjectType(an),
+TrackType::TrackType():
        appearance(0),
        state_bits(0),
        autofit_preference(1)
index bccd10baadc0a4c551570ece52383b2b8998b915..b540e291bd4bf75bef03440ef9530c91321e61a1 100644 (file)
@@ -56,7 +56,7 @@ private:
        std::string object;
 
 public:
-       TrackType(const ArticleNumber & = ArticleNumber());
+       TrackType();
 
        const TrackAppearance &get_appearance() const;
        float get_gauge() const;
index 58ef1d468cb4946294a166f85cf020a862ac8748..59787455e3cf1a6c7e81da4bd076b09b4de7377b 100644 (file)
@@ -10,8 +10,7 @@ using namespace Msp;
 
 namespace R2C2 {
 
-VehicleType::VehicleType(const ArticleNumber &an):
-       ObjectType(an),
+VehicleType::VehicleType():
        locomotive(false),
        swap_direction(false),
        gauge(1.524),
index 4a4d725cbab8daadabf7ec95cedf90017fa794a3..c22f6bf3bf29a96abc7605fb6d5111e7292605b7 100644 (file)
@@ -180,7 +180,7 @@ private:
        float max_speed;
 
 public:
-       VehicleType(const ArticleNumber & = ArticleNumber());
+       VehicleType();
 
        bool is_locomotive() const { return locomotive; }
        unsigned get_max_function() const;
index 073c5b75a61bd994547e0da6ac655dd092757c37..5f51c96469cc9205179920008dc35627200a4d90 100644 (file)
@@ -1,5 +1,11 @@
-terrain "100001"
+terrain "tb5"
 {
+       article_number
+       {
+               vendor "MSP";
+               article "tb5";
+       };
+
        surface
        {
        };
@@ -10,7 +16,7 @@ terrain "100001"
 
 layout
 {
-       terrain "100001"
+       terrain "tb5"
        {
                position 0.1519720 0.2448861 0.000000;
                rotation 0.000000;
index 9a35bdea3c601ee7113da4a5d4511a4ff4dc3c47..13241d986c64342c7d49b000dd8673eb44d3a76e 100644 (file)
@@ -44,6 +44,11 @@ track_appearance "C"
 
 track "24064"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24064";
+       };
        appearance "C";
        description "Straight, 64.3mm (R3-R4-R5)";
        part
@@ -54,6 +59,11 @@ track "24064"
 
 track "24071"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24071";
+       };
        appearance "C";
        description "Straight, 70.8mm (for slim turnouts)";
        part
@@ -65,6 +75,11 @@ track "24071"
 
 track "24077"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24077";
+       };
        appearance "C";
        description "Straight, 77.5mm (R1-R2-R3)";
        part
@@ -76,6 +91,11 @@ track "24077"
 
 track "24094"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24094";
+       };
        appearance "C";
        description "Straight, 94.2mm";
        part
@@ -87,6 +107,11 @@ track "24094"
 
 track "24172"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24172";
+       };
        appearance "C";
        description "Straight, 171.7mm";
        part
@@ -98,6 +123,11 @@ track "24172"
 
 track "24188"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24188";
+       };
        appearance "C";
        description "Straight, 188.3mm (turnout length)";
        part
@@ -109,6 +139,11 @@ track "24188"
 
 track "24229"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24229";
+       };
        appearance "C";
        description "Straight, 229.3mm";
        part
@@ -119,6 +154,11 @@ track "24229"
 
 track "24236"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24236";
+       };
        appearance "C";
        description "Straight, 236.1mm (slim turnout length)";
        part
@@ -129,6 +169,11 @@ track "24236"
 
 track "24360"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24360";
+       };
        appearance "C";
        description "Straight, 360mm";
        part
@@ -141,6 +186,11 @@ track "24360"
 
 track "24107"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24107";
+       };
        appearance "C";
        description "Curve, R1 = 360mm, 7.5°";
        part
@@ -152,6 +202,11 @@ track "24107"
 
 track "24115"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24115";
+       };
        appearance "C";
        description "Curve, R1 = 360mm, 15°";
        part
@@ -163,6 +218,11 @@ track "24115"
 
 track "24130"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24130";
+       };
        appearance "C";
        description "Curve, R1 = 360mm, 30°";
        part
@@ -176,6 +236,11 @@ track "24130"
 
 track "24206"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24206";
+       };
        appearance "C";
        description "Curve, R2 = 437.5mm, 5.7° (turnout to 30°)";
        part
@@ -187,6 +252,11 @@ track "24206"
 
 track "24207"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24207";
+       };
        appearance "C";
        description "Curve, R2 = 437.5mm, 7.5°";
        part
@@ -198,6 +268,11 @@ track "24207"
 
 track "24215"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24215";
+       };
        appearance "C";
        description "Curve, R2 = 437.5mm, 15°";
        part
@@ -209,6 +284,11 @@ track "24215"
 
 track "24224"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24224";
+       };
        appearance "C";
        description "Curve, R2 = 437.5mm, 24.3° (turnout)";
        part
@@ -220,6 +300,11 @@ track "24224"
 
 track "24230"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24230";
+       };
        appearance "C";
        description "Curve, R2 = 437.5mm, 30°";
        part
@@ -233,6 +318,11 @@ track "24230"
 
 track "24330"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24330";
+       };
        appearance "C";
        description "Curve, R3 = 515mm, 30°";
        part
@@ -246,6 +336,11 @@ track "24330"
 
 track "24430"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24430";
+       };
        appearance "C";
        description "Curve, R4 = 579.3mm, 30°";
        part
@@ -259,6 +354,11 @@ track "24430"
 
 track "24530"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24530";
+       };
        appearance "C";
        description "Curve, R5 = 643.6mm, 30°";
        part
@@ -272,6 +372,11 @@ track "24530"
 
 track "24912"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24912";
+       };
        appearance "C";
        description "Curve, R = 1114.6mm, 12.1° (slim turnout)";
        part
@@ -285,6 +390,11 @@ track "24912"
 
 track "24671"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24671";
+       };
        appearance "C";
        description "Curved turnout, left";
        part
@@ -309,6 +419,11 @@ track "24671"
 
 track "24672"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24672";
+       };
        appearance "C";
        description "Curved turnout, right";
        part
@@ -335,6 +450,11 @@ track "24672"
 
 track "24611"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24611";
+       };
        appearance "C";
        description "Turnout, left";
        part
@@ -352,6 +472,11 @@ track "24611"
 
 track "24612"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24612";
+       };
        appearance "C";
        description "Turnout, right";
        part
@@ -369,6 +494,11 @@ track "24612"
 
 track "24630"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24630";
+       };
        appearance "C";
        description "Turnout, 3-way";
        part
@@ -392,6 +522,11 @@ track "24630"
 
 track "24624"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24624";
+       };
        appearance "C";
        description "Turnout, double slip";
        state_bits 1;
@@ -425,6 +560,11 @@ track "24624"
 
 track "24711"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24711";
+       };
        appearance "C";
        description "Slim turnout, left";
        part
@@ -442,6 +582,11 @@ track "24711"
 
 track "24712"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24712";
+       };
        appearance "C";
        description "Slim turnout, right";
        part
@@ -461,6 +606,11 @@ track "24712"
 
 track "24640"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24640";
+       };
        appearance "C";
        description "Crossing, 24.3°";
        part
@@ -476,6 +626,11 @@ track "24640"
 
 track "24649"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24649";
+       };
        appearance "C";
        description "Crossing, 48.6°";
        part
@@ -491,6 +646,11 @@ track "24649"
 
 track "24740"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24740";
+       };
        appearance "C";
        description "Slim crossing, 12.1°";
        part
@@ -508,6 +668,11 @@ track "24740"
 
 track "24977"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "24977";
+       };
        appearance "C";
        description "Bumper";
        object "bumper.object";
@@ -522,6 +687,11 @@ track "24977"
 
 signal "7039"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "7039";
+       };
        indication "Hp1"
        {
                aspect 0;
index 6e110682de47196b40dd898f0d057eb919008bb2..5ba888ef643e6ae1ac08dc58bf2ab46b3f40845c 100644 (file)
@@ -2,6 +2,11 @@ scale 1 87;
 
 vehicle "46274"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "46274";
+       };
        name "Saar Railroad Gmhs 54";
 
        gauge 16.5;
@@ -17,6 +22,12 @@ vehicle "46274"
 
 vehicle "29820-02b"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "29820";
+               part "02b";
+       };
        name "BR 50 tender";
 
        gauge 16.5;
@@ -44,6 +55,11 @@ vehicle "29820-02b"
 
 vehicle "4442"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "4442";
+       };
        name "Z";
 
        gauge 16.5;
@@ -59,6 +75,12 @@ vehicle "4442"
 
 vehicle "29859b"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "29859";
+               part "b";
+       };
        name "Zas";
 
        gauge 16.5;
@@ -82,8 +104,14 @@ vehicle "29859b"
        };
 };
 
-vehicle "100004"
+vehicle "46034e"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "46034";
+               part "e";
+       };
        name "Omm 52";
 
        gauge 16.5;
@@ -99,6 +127,11 @@ vehicle "100004"
 
 vehicle "47001"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "47001";
+       };
        name "Rs 684";
 
        gauge 16.5;
@@ -126,6 +159,11 @@ vehicle "47001"
 
 vehicle "48943"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "48943";
+       };
        name "BTr 10";
 
        gauge 16.5;
@@ -141,6 +179,11 @@ vehicle "48943"
 
 vehicle "43222"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "43222";
+       };
        name "B4üw 38 \"Schürzenwagen\"";
 
        gauge 16.5;
@@ -166,6 +209,12 @@ vehicle "43222"
 
 vehicle "39230b"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "39230";
+               part "b";
+       };
        name "BR 23 tender";
 
        gauge 16.5;
@@ -191,6 +240,11 @@ vehicle "39230b"
 
 vehicle "43800"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "43800";
+       };
        name "B4nzb 64 \"Silberling\"";
 
        gauge 16.5;
@@ -219,6 +273,11 @@ vehicle "43800"
 
 vehicle "47072"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "47042";
+       };
        name "Sgns 691";
 
        gauge 16.5;
@@ -246,6 +305,11 @@ vehicle "47072"
 
 vehicle "4624"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "4624";
+       };
        name "Fals-u 176";
 
        gauge 16.5;
@@ -273,6 +337,11 @@ vehicle "4624"
 
 vehicle "4423"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "4423";
+       };
        name "Kklm 505";
 
        gauge 16.5;
@@ -288,6 +357,11 @@ vehicle "4423"
 
 vehicle "4410"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "4410";
+       };
        name "Gs 210";
 
        gauge 16.5;
@@ -303,6 +377,11 @@ vehicle "4410"
 
 vehicle "46977"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "46977";
+       };
        name "Rlmmso 56";
 
        gauge 16.5;
@@ -318,6 +397,11 @@ vehicle "46977"
 
 vehicle "4699"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "4699";
+       };
        name "Pwg 14";
 
        gauge 16.5;
@@ -333,6 +417,11 @@ vehicle "4699"
 
 vehicle "46717"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "46717";
+       };
        name "Railway crane";
 
        gauge 16.5;
@@ -349,6 +438,11 @@ vehicle "46717"
 
 vehicle "4690"
 {
+       article_number
+       {
+               vendor "Märklin";
+               article "4690";
+       };
        name "Eaos 106";
 
        gauge 16.5;
@@ -378,6 +472,12 @@ vehicle "4690"
 vehicle "37504b"
 {
        // XXX The power car is really in the middle, but that configuration isn't supported yet
+       article_number
+       {
+               vendor "Märklin";
+               article "37504";
+               part "b";
+       };
        name "BR 421 S-bahn";
 
        gauge 16.5;
@@ -407,6 +507,12 @@ vehicle "37504b"
 vehicle "37504c"
 {
        // XXX Better solution would be to allow flipping of vehicles
+       article_number
+       {
+               vendor "Märklin";
+               article "37504";
+               part "c";
+       };
        name "BR 420 S-bahn";
 
        gauge 16.5;