Update of /cvsroot/darkeyetool/det/src/dsa In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15658/src/dsa Modified Files: AbgeleiteterWert.cpp AbgeleiteterWert.h Auswahl.h Charakteristikum.cpp Charakteristikum.h Eigenschaft.cpp Eigenschaft.h Hole.cpp Hole.h Kampftechnik.cpp Kampftechnik.h Kultur.cpp Kultur.h Menge.h Modifikator.cpp Modifikator.h NDSABasis.cpp NDSABasis.h NDSAUtil.cpp NDSAUtil.h PersistenzManager.cpp PersistenzManager.h Person.cpp Person.h PersonHandler.cpp PersonHandler.h PersonHandlerBetrachter.h PersonHandlerEditor.h PersonHandlerGenerator.cpp PersonHandlerGenerator.h PersonHandlerSteigern.h PersonenKomponente.cpp PersonenKomponente.h Profession.cpp Profession.h Rasse.cpp Rasse.h Regeln.cpp Regeln.h Sonderfertigkeit.cpp Sonderfertigkeit.h SpracheSchrift.cpp SpracheSchrift.h Talent.cpp Talent.h Texte.cpp Texte.h Voraussetzung.cpp Voraussetzung.h Wuerfel.cpp Wuerfel.h Zauber.cpp Zauber.h Log Message: IDs und Bezeichner getrennt - I18N vorbereitet ACHTUNG! Daten sichern. Das Programm ist noch reichlich fehlerhaft. Aber Entwicklung ohne CVS wird mir zu doof. Vorsicht vor allem mit Helden und RKP. Tausend Kleinigkeiten geaendert. Neue Datensaetze in basis.xdi. Index: Profession.cpp =================================================================== RCS file: /cvsroot/darkeyetool/det/src/dsa/Profession.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Profession.cpp 12 Apr 2004 23:15:50 -0000 1.16 +++ Profession.cpp 17 Oct 2004 19:12:40 -0000 1.17 @@ -11,18 +11,64 @@ //@<< header >> //@+node:<< header >> //@+at -// The content of this file is subject to the license -// given in license.txt +// Copyright (c) 2002-2004, Zdenko Denny Vrandecic and +// contributors. +// All rights reserved. +// (The license follows closely the new +// BSD-OpenSource-License) // +// Redistribution and use in source and binary forms, with +// or without +// modification, are permitted provided that the following +// conditions are met: +// Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the +// following disclaimer in the documentation +// and/or other materials provided with the distribution. +// Neither the name of the copyrightholder or one of the +// contributers to this source may be used to endorse or +// promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// If you use this source, please inform me, so I can keep +// track of how useful it really is. That would be very +// appreciated. +// +// The data distributed with this code is copyrighted by +// Fantasy Production, Erkrath, Germany, and *not* subject +// to the here given license. Distributing and using this +// data is granted by FanPro for the purpose of using +// computer driven tools for the role playing game "Das +// Schwarze Auge" / "The Dark Eye". Any other use is only +// allowed with prior written permission by FanPro. //@-at //@@c #ifdef MSVC #pragma warning(disable:4786 4503) #endif + //@-node:<< header >> //@nl - //@<< includes >> //@+node:<< includes >> #include "Profession.h" @@ -34,7 +80,6 @@ #include <algorithm> //@-node:<< includes >> //@nl - //@<< filename >> //@+node:<< filename >> #ifdef _DEBUG @@ -48,29 +93,29 @@ namespace DSA { - //@ << class Profession >> - //@+node:<< class Profession >> - //@<< Lese >> - //@+node:<< Lese >> + //@ @+others + //@+node:class Profession + //@+others + //@+node:Lese int Profession::Lese(PersistenzManager* pm, const std::string& id) { - std::string geleseneID = id; - int rv = pm->OeffneZumLesen(_t("Profession"), geleseneID); + std::string geleseneID = id; + int rv = pm->OeffneZumLesen("Profession", geleseneID); std::string mBez = ""; - if (pm->Existiert(_t("geschlechtsspezifischeBezeichnung"), _t("männlich"))) - rv += pm->Lese(_t("geschlechtsspezifischeBezeichnung"), _t("männlich"), mBez); + if (pm->Existiert("geschlechtsspezifischeBezeichnung", "männlich")) + rv += pm->Lese("geschlechtsspezifischeBezeichnung", "männlich", mBez); std::string wBez = ""; - if (pm->Existiert(_t("geschlechtsspezifischeBezeichnung"), _t("weiblich"))) - rv += pm->Lese(_t("geschlechtsspezifischeBezeichnung"), _t("weiblich"), wBez); + if (pm->Existiert(("geschlechtsspezifischeBezeichnung"), ("weiblich"))) + rv += pm->Lese(("geschlechtsspezifischeBezeichnung"), ("weiblich"), wBez); // bool zeitaufwendig = pm->Existiert(_t("zeitaufwendig")); // bool erstprofession = pm->Existiert(_t("Erstprofession")); int dauer = 0; - if (pm->Existiert(_t("Dauer"))) - rv += pm->Lese(_t("Dauer"), dauer); + if (pm->Existiert(("Dauer"))) + rv += pm->Lese(("Dauer"), dauer); StringListe zweitsprache; - rv += pm->Lese(zweitsprache, _t("Sprache"), _t("Sprachen"), _t("Zweitsprache")); + rv += pm->Lese(zweitsprache, ("Sprache"), ("Sprachen"), ("Zweitsprache")); StringListe bekannteSprueche; - rv += pm->Lese(bekannteSprueche, _t("Zauber"), _t("Sprüche"), _t("bekannte")); + rv += pm->Lese(bekannteSprueche, ("Zauber"), ("Sprüche"), ("bekannte")); //@+at @@ -83,10 +128,10 @@ //@-at //@@c - pm->SchliesseNachLesen(); - rv += PersonenKomponente::Lese(pm, _t("Profession"), geleseneID); + pm->SchliesseNachLesen(); + rv += PersonenKomponente::Lese(pm, ("Profession"), geleseneID); - if (!rv) { + if (!rv) { //@+at //@nonl // kritische Stelle @@ -115,21 +160,19 @@ zweitsprache_ = zweitsprache; bekannteSprueche_ = bekannteSprueche; Dauer(dauer); - } - return rv; // TODO + } + return rv; // TODO } // Lese - //@-node:<< Lese >> - //@nl - //@<< Schreibe >> - //@+node:<< Schreibe >> + //@-node:Lese + //@+node:Schreibe int Profession::Schreibe(PersistenzManager* pm) const { - int rv = PersonenKomponente::Schreibe(pm, _t("Profession")); - rv += pm->OeffneZumSchreiben(_t("Profession"), ID()); + int rv = PersonenKomponente::Schreibe(pm, ("Profession")); + rv += pm->OeffneZumSchreiben(("Profession"), ID()); if (mBez_!="") - rv += pm->Schreibe(_t("geschlechtsspezifischeBezeichnung"), _t("männlich"), mBez_); + rv += pm->Schreibe(("geschlechtsspezifischeBezeichnung"), ("männlich"), mBez_); if (wBez_!="") - rv += pm->Schreibe(_t("geschlechtsspezifischeBezeichnung"), _t("weiblich"), wBez_); + rv += pm->Schreibe(("geschlechtsspezifischeBezeichnung"), ("weiblich"), wBez_); // if (Zeitaufwendig()) { // rv += pm->OeffneZumSchreiben(_t("zeitaufwendig")); // rv += pm->SchliesseNachSchreiben(); @@ -139,9 +182,9 @@ // rv += pm->SchliesseNachSchreiben(); // } if (Dauer()!=0) - rv += pm->Schreibe(_t("Dauer"), Dauer()); - rv += pm->Schreibe(zweitsprache_, _t("Sprache"), _t("Sprachen"), _t("Zweitsprache")); - rv += pm->Schreibe(bekannteSprueche_, _t("Zauber"), _t("Sprüche"), _t("bekannte")); + rv += pm->Schreibe(("Dauer"), Dauer()); + rv += pm->Schreibe(zweitsprache_, ("Sprache"), ("Sprachen"), ("Zweitsprache")); + rv += pm->Schreibe(bekannteSprueche_, ("Zauber"), ("Sprüche"), ("bekannte")); //@+at //@nonl @@ -152,20 +195,17 @@ // _t("Kulturen")); //@-at //@@c - rv += pm->SchliesseNachSchreiben(); - return rv; // TODO + rv += pm->SchliesseNachSchreiben(); + return rv; // TODO } // Schreibe - //@-node:<< Schreibe >> - //@nl + //@-node:Schreibe + //@-others //@nonl - //@-node:<< class Profession >> - //@nl - - //@ << class ProfessionDefinition >> - //@+node:<< class ProfessionDefinition >> - //@<< Zeitaufwendig >> - //@+node:<< Zeitaufwendig >> + //@-node:class Profession + //@+node:class ProfessionDefinition + //@+others + //@+node:Zeitaufwendig void ProfessionDefinition::Zeitaufwendig(const bool z) { if (zeitaufwendig_==z) return; if (zeitaufwendig_) @@ -177,22 +217,16 @@ zeitaufwendig_ = z; } // Zeitaufwendig //@nonl - //@-node:<< Zeitaufwendig >> - //@nl - - //@<< Erstprofession >> - //@+node:<< Erstprofession >> + //@-node:Zeitaufwendig + //@+node:Erstprofession void ProfessionDefinition::Erstprofession(const bool e) { if (erstprofession_==e) return; if (!erstprofession_) Zeitaufwendig(false); erstprofession_ = e; } // Erstprofession //@nonl - //@-node:<< Erstprofession >> - //@nl - - //@<< Text >> - //@+node:<< Text >> + //@-node:Erstprofession + //@+node:Text std::string ProfessionDefinition::Text(const std::string& trennzeichenDerEinzelne, const std::string& zwischenEinzelneTitelUndSachen, const std::string& trennzeichenImEinzelnen, const std::string& wennEinzelnesLeer) const { std::string s = kategorie_ + trennzeichenDerEinzelne; s += PersonenKomponenteDefinition::Text(trennzeichenDerEinzelne, zwischenEinzelneTitelUndSachen, trennzeichenImEinzelnen, wennEinzelnesLeer); @@ -200,11 +234,8 @@ return s; } // Text //@nonl - //@-node:<< Text >> - //@nl - - //@<< MoeglicheKulturen >> - //@+node:<< MoeglicheKulturen >> + //@-node:Text + //@+node:MoeglicheKulturen StringListe ProfessionDefinition::MoeglicheKulturen() const { StringListe sl; for (KulturDefinitionen::iterator ki = kulturen()->begin(); ki != kulturen()->end(); ++ki) @@ -213,30 +244,27 @@ return sl; } // MoeglicheKulturen //@nonl - //@-node:<< MoeglicheKulturen >> - //@nl - - //@<< Lese >> - //@+node:<< Lese >> + //@-node:MoeglicheKulturen + //@+node:Lese int ProfessionDefinition::Lese(PersistenzManager* pm, const std::string& id) { - std::string geleseneID = id; - int rv = pm->OeffneZumLesen(_t("Profession"), geleseneID); + std::string geleseneID = id; + int rv = pm->OeffneZumLesen(("Profession"), geleseneID); std::string mBez = geleseneID; - if (pm->Existiert(_t("Bezeichnung"), _t("männlich"))) - rv += pm->Lese(_t("Bezeichnung"), _t("männlich"), mBez); + if (pm->Existiert(("Bezeichnung"), ("männlich"))) + rv += pm->Lese(("Bezeichnung"), ("männlich"), mBez); std::string wBez = geleseneID; - if (pm->Existiert(_t("Bezeichnung"), _t("weiblich"))) - rv += pm->Lese(_t("Bezeichnung"), _t("weiblich"), wBez); - bool zeitaufwendig = pm->Existiert(_t("zeitaufwendig")); - bool erstprofession = pm->Existiert(_t("Erstprofession")); + if (pm->Existiert(("Bezeichnung"), ("weiblich"))) + rv += pm->Lese(("Bezeichnung"), ("weiblich"), wBez); + bool zeitaufwendig = pm->Existiert(("zeitaufwendig")); + bool erstprofession = pm->Existiert(("Erstprofession")); int dauer = 0; - if (pm->Existiert(_t("Dauer"))) - rv += pm->Lese(_t("Dauer"), dauer); + if (pm->Existiert(("Dauer"))) + rv += pm->Lese(("Dauer"), dauer); StringListe zweitsprache; - rv += pm->Lese(zweitsprache, _t("Sprache"), _t("Sprachen"), _t("Zweitsprache")); + rv += pm->Lese(zweitsprache, ("Sprache"), ("Sprachen"), ("Zweitsprache")); StringListe bekannteSprueche; - rv += pm->Lese(bekannteSprueche, _t("Zauber"), _t("Sprüche"), _t("bekannte")); + rv += pm->Lese(bekannteSprueche, ("Zauber"), ("Sprüche"), ("bekannte")); //@+at @@ -249,10 +277,10 @@ //@-at //@@c - pm->SchliesseNachLesen(); - rv += PersonenKomponenteDefinition::Lese(pm, geleseneID); + pm->SchliesseNachLesen(); + rv += PersonenKomponenteDefinition::Lese(pm, geleseneID); - if (!rv) { + if (!rv) { //@+at //@nonl // kritische Stelle @@ -281,34 +309,31 @@ Dauer(dauer); zweitsprache_ = zweitsprache; bekannteSprueche_ = bekannteSprueche; - } - return rv; // TODO + } + return rv; // TODO } // Lese //@nonl - //@-node:<< Lese >> - //@nl - - //@<< Schreibe >> - //@+node:<< Schreibe >> + //@-node:Lese + //@+node:Schreibe int ProfessionDefinition::Schreibe(PersistenzManager* pm) const { - int rv = PersonenKomponenteDefinition::Schreibe(pm); - rv += pm->OeffneZumSchreiben(Klasse(), ID()); + int rv = PersonenKomponenteDefinition::Schreibe(pm); + rv += pm->OeffneZumSchreiben(Klasse(), ID()); if (mBez_!="") - rv += pm->Schreibe(_t("Bezeichnung"), _t("männlich"), mBez_); + rv += pm->Schreibe(("Bezeichnung"), ("männlich"), mBez_); if (wBez_!="") - rv += pm->Schreibe(_t("Bezeichnung"), _t("weiblich"), wBez_); + rv += pm->Schreibe(("Bezeichnung"), ("weiblich"), wBez_); if (Zeitaufwendig()) { - rv += pm->OeffneZumSchreiben(_t("zeitaufwendig")); + rv += pm->OeffneZumSchreiben(("zeitaufwendig")); rv += pm->SchliesseNachSchreiben(); } if (Erstprofession()) { - rv += pm->OeffneZumSchreiben(_t("Erstprofession")); + rv += pm->OeffneZumSchreiben(("Erstprofession")); rv += pm->SchliesseNachSchreiben(); } if (Dauer()!=0) - rv += pm->Schreibe(_t("Dauer"), Dauer()); - rv += pm->Schreibe(zweitsprache_, _t("Sprache"), _t("Sprachen"), _t("Zweitsprache")); - rv += pm->Schreibe(bekannteSprueche_, _t("Zauber"), _t("Sprüche"), _t("bekannte")); + rv += pm->Schreibe(("Dauer"), Dauer()); + rv += pm->Schreibe(zweitsprache_, ("Sprache"), ("Sprachen"), ("Zweitsprache")); + rv += pm->Schreibe(bekannteSprueche_, ("Zauber"), ("Sprüche"), ("bekannte")); //@+at //@nonl @@ -319,24 +344,32 @@ // _t("Kulturen")); //@-at //@@c - rv += pm->SchliesseNachSchreiben(); - return rv; // TODO + rv += pm->SchliesseNachSchreiben(); + return rv; // TODO } // Schreibe //@nonl - //@-node:<< Schreibe >> - //@nl - //@nonl - //@-node:<< class ProfessionDefinition >> - //@nl + //@-node:Schreibe + //@-others + + //@-node:class ProfessionDefinition + //@-others - ProfessionDefinitionen* professionen() - { static ProfessionDefinitionen* professionen_ = new ProfessionDefinitionen(); return professionen_; } + ProfessionDefinitionen* professionen() + { static ProfessionDefinitionen* professionen_ = new ProfessionDefinitionen(); return professionen_; } } //@<< Version History >> //@+node:<< Version History >> // $Log$ +// Revision 1.17 2004/10/17 19:12:40 vrandezo +// IDs und Bezeichner getrennt - I18N vorbereitet +// ACHTUNG! Daten sichern. Das Programm ist noch reichlich fehlerhaft. +// Aber Entwicklung ohne CVS wird mir zu doof. +// Vorsicht vor allem mit Helden und RKP. +// Tausend Kleinigkeiten geaendert. +// Neue Datensaetze in basis.xdi. +// // Revision 1.16 2004/04/12 23:15:50 vrandezo // Professionen bieten bekannte Zaubersprueche mit // @@ -454,5 +487,6 @@ //@nonl //@-node:<< Version History >> //@nl + //@-node:@file Profession.cpp //@-leo Index: PersonHandlerGenerator.cpp =================================================================== RCS file: /cvsroot/darkeyetool/det/src/dsa/PersonHandlerGenerator.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- PersonHandlerGenerator.cpp 24 Jun 2004 00:27:09 -0000 1.55 +++ PersonHandlerGenerator.cpp 17 Oct 2004 19:12:39 -0000 1.56 @@ -12,15 +12,62 @@ //@<< header >> //@+node:<< header >> //@+at -// The content of this file is subject to the license -// given in license.txt +// Copyright (c) 2002-2004, Zdenko Denny Vrandecic and +// contributors. +// All rights reserved. +// (The license follows closely the new +// BSD-OpenSource-License) +// [...2562 lines suppressed...] + //@-others + //@-node:class PersonHandlerGenerator + //@-others } //@<< Version History >> //@+node:<< Version History >> // $Log$ +// Revision 1.56 2004/10/17 19:12:39 vrandezo +// IDs und Bezeichner getrennt - I18N vorbereitet +// ACHTUNG! Daten sichern. Das Programm ist noch reichlich fehlerhaft. +// Aber Entwicklung ohne CVS wird mir zu doof. +// Vorsicht vor allem mit Helden und RKP. +// Tausend Kleinigkeiten geaendert. +// Neue Datensaetze in basis.xdi. +// // Revision 1.55 2004/06/24 00:27:09 twel // Akademische Ausbildung (Gelehrter) implementiert // Index: Charakteristikum.h =================================================================== RCS file: /cvsroot/darkeyetool/det/src/dsa/Charakteristikum.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Charakteristikum.h 5 Jan 2004 02:45:29 -0000 1.14 +++ Charakteristikum.h 17 Oct 2004 19:12:39 -0000 1.15 @@ -11,15 +11,62 @@ //@<< header >> //@+node:<< header >> //@+at -// The content of this file is subject to the license -// given in license.txt +// Copyright (c) 2002-2004, Zdenko Denny Vrandecic and +// contributors. +// All rights reserved. +// (The license follows closely the new +// BSD-OpenSource-License) +// +// Redistribution and use in source and binary forms, with +// or without +// modification, are permitted provided that the following +// conditions are met: +// Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the +// following disclaimer in the documentation +// and/or other materials provided with the distribution. +// Neither the name of the copyrightholder or one of the +// contributers to this source may be used to endorse or +// promote products derived from this software without +// specific prior written permission. // +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// If you use this source, please inform me, so I can keep +// track of how useful it really is. That would be very +// appreciated. +// +// The data distributed with this code is copyrighted by +// Fantasy Production, Erkrath, Germany, and *not* subject +// to the here given license. Distributing and using this +// data is granted by FanPro for the purpose of using +// computer driven tools for the role playing game "Das +// Schwarze Auge" / "The Dark Eye". Any other use is only +// allowed with prior written permission by FanPro. //@-at //@@c #ifdef MSVC #pragma warning(disable:4786 4503) #endif + //@-node:<< header >> //@nl @@ -29,9 +76,10 @@ //@<< includes >> //@+node:<< includes >> #include "Menge.h" -#include "Texte.h" #include "Voraussetzung.h" #include "Auswahl.h" + +#include "Definition.h" //@nonl //@-node:<< includes >> //@nl @@ -39,26 +87,35 @@ namespace DSA { class PersistenzManager; class Person; - - //@ << class CharakteristikumDefinition >> - //@+node:<< class CharakteristikumDefinition >> - class CharakteristikumDefinition { + + //@ @+others + //@+node:class CharakteristikumDefinition + class CharakteristikumDefinition : public Definition { public: //@ << Administrativa >> //@+node:<< Administrativa >> - CharakteristikumDefinition(const std::string& id = "") : id_(id), gp_(0), gebunden_(false), unsichtbar_(false), hatStufen_(false), stufe_(0), gpPro2Punkte_(false), schlechteEigenschaft_(false), brauchtSpezifizierung_(false) {} - static std::string Klasse() { return _t("Charakteristikum"); } - static std::string Klassen() { return _t("Charakteristika"); } - - void ID(const std::string& id) { id_ = id; } - std::string ID() const { return id_; } - void Beschreibung(const std::string& beschreibung) { beschreibung_ = beschreibung; } - std::string Beschreibung() const { return beschreibung_; } + CharakteristikumDefinition(const std::string& id = "") : + Definition(id), + gp_(0), + gebunden_(false), + unsichtbar_(false), + hatStufen_(false), + stufe_(0), + gpPro2Punkte_(false), + schlechteEigenschaft_(false), + brauchtSpezifizierung_(false), + generiert_(false) {} + + static std::string Klasse() { return ("Charakteristikum"); } + virtual std::string VirtuelleKlasse() const { return Klasse(); } + static std::string Klassen() { return ("Charakteristika"); } std::string Text(const Person& p) const; - //@nonl //@-node:<< Administrativa >> //@nl + + std::string Bezeichnung(const std::string& sprache = DSA::Lang()) const; + using Definition::Bezeichnung; void GP(int gp) { gp_ = gp; } int GP() const { return gp_; } @@ -79,9 +136,31 @@ void BrauchtSpezifizierung(const bool b) { brauchtSpezifizierung_ = b; } bool Hinzufuegbar(const Person&) const; - - bool Vorteil() const { return gp_>0; } - bool Nachteil() const { return gp_<0; } + + //@ << Semantische Abfragen >> + //@+node:<< Semantische Abfragen >> + bool Vorteil() const { return gp_>0; } + bool Nachteil() const { return gp_<0; } + + bool IstGeneriert() const { return generiert_; } + void IstGeneriert(bool g) { generiert_ = g; } + + bool IstHerausragendeEigenschaft() const; + Eigenschaftsart HerausragendeEigenschaft() const; + bool IstMiserableEigenschaft() const; + Eigenschaftsart MiserableEigenschaft() const; + + bool IstBegabungTalent() const; + std::string BegabungTalent() const; + bool IstUnfaehigkeitTalent() const; + std::string UnfaehigkeitTalent() const; + bool IstBegabungTalentgruppe() const; + Talentgruppe BegabungTalentgruppe() const; + bool IstUnfaehigkeitTalentgruppe() const; + Talentgruppe UnfaehigkeitTalentgruppe() const; + bool IstUnfaehigkeitSprachen() const; + //@-node:<< Semantische Abfragen >> + //@nl std::string BasiertAuf() const { return basiertAuf_; } void BasiertAuf(const std::string& b) { basiertAuf_ = b; } @@ -92,8 +171,7 @@ //@ << operator== >> //@+node:<< operator== >> bool operator==(const CharakteristikumDefinition& other) const { - return ((id_==other.id_) - && (beschreibung_==other.beschreibung_) + return ((Definition::operator==(other)) && (hatStufen_==other.hatStufen_) && (stufe_==other.stufe_) && (basiertAuf_==other.basiertAuf_) @@ -113,7 +191,7 @@ //@+node:<< Lese/Schreibe >> int Lese(PersistenzManager* pm, const std::string& id = ""); int Schreibe(PersistenzManager* pm) const; - int Pruefe() const; + int Pruefe(); static int IDListe(PersistenzManager* pm, StringListe* liste); //@nonl //@-node:<< Lese/Schreibe >> @@ -124,10 +202,8 @@ private: //@ << private >> //@+node:<< private >> - std::string id_; int gp_; std::string basiertAuf_; - std::string beschreibung_; bool gebunden_; bool unsichtbar_; int stufe_; @@ -135,24 +211,13 @@ bool schlechteEigenschaft_; bool gpPro2Punkte_; bool brauchtSpezifizierung_; + bool generiert_; //@nonl //@-node:<< private >> //@nl }; // CharakteristikumDefinition - //@nonl - //@-node:<< class CharakteristikumDefinition >> - //@nl - - class CharakteristikumDefinitionen : public Menge<CharakteristikumDefinition> { - }; // CharakteristikumDefinitionen - - CharakteristikumDefinitionen* charakteristika(); - - CharakteristikumDefinitionen* generierteCharakteristika(); - void GeneriereCharakteristika(); - - //@ << class Charakteristikum >> - //@+node:<< class Charakteristikum >> + //@-node:class CharakteristikumDefinition + //@+node:class Charakteristikum class Charakteristikum { public: //@ << Administrativa >> @@ -160,12 +225,11 @@ Charakteristikum(const std::string& id = "") : id_(id), stufe_(0), spezifizierung_("") {} Charakteristikum(const CharakteristikumDefinition& def) : id_(def.ID()), stufe_((def.HatStufen()?1:0)) {} Charakteristikum(const CharakteristikumDefinition* const def) : id_(def->ID()), stufe_((def->HatStufen()?1:0)) {} - static std::string Klasse() { return _t("Charakteristikum"); } - static std::string Klassen() { return _t("Charakteristika"); } + static std::string Klasse() { return ("Charakteristikum"); } + static std::string Klassen() { return ("Charakteristika"); } void ID(const std::string& id) { id_ = id; } std::string ID() const { return id_; } - //@nonl //@-node:<< Administrativa >> //@nl @@ -195,23 +259,20 @@ //@+node:<< Lese/Schreibe >> int Lese(PersistenzManager* pm, const std::string& id = ""); int Schreibe(PersistenzManager* pm) const; - int Pruefe() const; + int Pruefe(); static int IDListe(PersistenzManager* pm, StringListe* liste); //@nonl //@-node:<< Lese/Schreibe >> //@nl private: - std::string id_; + std::string id_; int stufe_; std::string spezifizierung_; }; // Charakteristikum //@nonl - //@-node:<< class Charakteristikum >> - //@nl - - //@ << class Charakteristika >> - //@+node:<< class Charakteristika >> + //@-node:class Charakteristikum + //@+node:class Charakteristika class Charakteristika : public Menge<Charakteristikum> { public: bool Verfuegt(const std::string& id) const; @@ -219,11 +280,17 @@ // bool FuegeEin(Modifikator modifikator); }; // Charakteristika //@nonl - //@-node:<< class Charakteristika >> - //@nl + //@-node:class Charakteristika + //@-others + + class CharakteristikumDefinitionen : public Menge<CharakteristikumDefinition> {}; + + CharakteristikumDefinitionen* charakteristika(); + + CharakteristikumDefinitionen* generierteCharakteristika(); + void GeneriereCharakteristika(); - class CharakteristikaAuswahl : public AuswahlMenge<Charakteristikum> { - }; // CharakteristikaAuswahl + class CharakteristikaAuswahl : public AuswahlMenge<Charakteristikum> {}; } @@ -232,6 +299,14 @@ //@<< Version History >> //@+node:<< Version History >> // $Log$ +// Revision 1.15 2004/10/17 19:12:39 vrandezo +// IDs und Bezeichner getrennt - I18N vorbereitet +// ACHTUNG! Daten sichern. Das Programm ist noch reichlich fehlerhaft. +// Aber Entwicklung ohne CVS wird mir zu doof. +// Vorsicht vor allem mit Helden und RKP. +// Tausend Kleinigkeiten geaendert. +// Neue Datensaetze in basis.xdi. +// // Revision 1.14 2004/01/05 02:45:29 vrandezo // Charakteristika bei RPK-Definition von Mengen auf Auswahlmengen umgestellt // Index: Regeln.h =================================================================== RCS file: /cvsroot/darkeyetool/det/src/dsa/Regeln.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Regeln.h 13 Apr 2004 21:45:45 -0000 1.8 +++ Regeln.h 17 Oct 2004 19:12:40 -0000 1.9 @@ -11,15 +11,62 @@ //@<< header >> //@+node:<< header >> //@+at -// The content of this file is subject to the license -// given in license.txt +// Copyright (c) 2002-2004, Zdenko Denny Vrandecic and +// contributors. +// All rights reserved. +// (The license follows closely the new +// BSD-OpenSource-License) // +// Redistribution and use in source and binary forms, with +// or without +// modification, are permitted provided that the following +// conditions are met: +// Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the +// following disclaimer in the documentation +// and/or other materials provided with the distribution. +// Neither the name of the copyrightholder or one of the +// contributers to this source may be used to endorse or +// promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// If you use this source, please inform me, so I can keep +// track of how useful it really is. That would be very +// appreciated. +// +// The data distributed with this code is copyrighted by +// Fantasy Production, Erkrath, Germany, and *not* subject +// to the here given license. Distributing and using this +// data is granted by FanPro for the purpose of using +// computer driven tools for the role playing game "Das +// Schwarze Auge" / "The Dark Eye". Any other use is only +// allowed with prior written permission by FanPro. //@-at //@@c #ifdef MSVC #pragma warning(disable:4786 4503) #endif + //@-node:<< header >> //@nl @@ -44,8 +91,8 @@ public: Regeln() { Default(); } - static std::string Klassen() { return _t("Regeloptionen"); } - static std::string Klasse() { return _t("Regeloption"); } + static std::string Klassen() { return "Regeloptionen"; } + static std::string Klasse() { return "Regeloption"; } void Regel(const std::string& id, int wert) { regel_[id] = wert; } int Regel(const std::string& id) const; @@ -67,7 +114,7 @@ int Lese(PersistenzManager* pm, const std::string& id = ""); int Schreibe(PersistenzManager* pm) const; - int Pruefe() const; + int Pruefe(); static int IDListe(PersistenzManager* pm, StringListe* liste); private: @@ -101,6 +148,14 @@ //@<< Version History >> //@+node:<< Version History >> // $Log$ +// Revision 1.9 2004/10/17 19:12:40 vrandezo +// IDs und Bezeichner getrennt - I18N vorbereitet +// ACHTUNG! Daten sichern. Das Programm ist noch reichlich fehlerhaft. +// Aber Entwicklung ohne CVS wird mir zu doof. +// Vorsicht vor allem mit Helden und RKP. +// Tausend Kleinigkeiten geaendert. +// Neue Datensaetze in basis.xdi. +// // Revision 1.8 2004/04/13 21:45:45 vrandezo // Akademische Ausbildung (Magier) implementiert // Aufräumarbeiten (besser in Leo integriert) Index: Eigenschaft.cpp =================================================================== RCS file: /cvsroot/darkeyetool/det/src/dsa/Eigenschaft.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Eigenschaft.cpp 13 Apr 2004 21:45:45 -0000 1.9 +++ Eigenschaft.cpp 17 Oct 2004 19:12:39 -0000 1.10 @@ -11,15 +11,62 @@ //@<< header >> //@+node:<< header >> //@+at -// The content of this file is subject to the license -// given in license.txt +// Copyright (c) 2002-2004, Zdenko Denny Vrandecic and +// contributors. +// All rights reserved. +// (The license follows closely the new +// BSD-OpenSource-License) +// +// Redistribution and use in source and binary forms, with +// or without +// modification, are permitted provided that the following +// conditions are met: +// Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the +// following disclaimer in the documentation +// and/or other materials provided with the distribution. +// Neither the name of the copyrightholder or one of the +// contributers to this source may be used to endorse or +// promote products derived from this software without +// specific prior written permission. // +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// If you use this source, please inform me, so I can keep +// track of how useful it really is. That would be very +// appreciated. +// +// The data distributed with this code is copyrighted by +// Fantasy Production, Erkrath, Germany, and *not* subject +// to the here given license. Distributing and using this +// data is granted by FanPro for the purpose of using +// computer driven tools for the role playing game "Das +// Schwarze Auge" / "The Dark Eye". Any other use is only +// allowed with prior written permission by FanPro. //@-at //@@c #ifdef MSVC #pragma warning(disable:4786 4503) #endif + //@-node:<< header >> //@nl //@<< includes >> @@ -58,27 +105,33 @@ Eigenschaft* ei = const_cast<Eigenschaft*>(this); // Herausragende Eigenschaft - std::string s = _t("Herausragende Eigenschaft"); - if (person_->charakteristika_.Existiert(s + " " + ID())) { - if (!modifikatoren_.Existiert(s)) - ei->modifikatoren_.FuegeEin(Modifikator(1, s)); - ei->modifikatoren_.Zeige(s)->Wert(person_->charakteristika_.Zeige(s + " "+ ID())->Stufe()); - } else - if (modifikatoren_.Existiert(s)) - ei->modifikatoren_.Loesche(s); + bool hatHerausragendeEigenschaft = false; + forallconst (Charakteristika, ch, person_->charakteristika_) + if (ch->second.Definition()->IstHerausragendeEigenschaft()) + if (ch->second.Definition()->HerausragendeEigenschaft() == Art()) { + if (!modifikatoren_.Existiert(ch->second.ID())) + ei->modifikatoren_.FuegeEin(Modifikator(1, ch->second.ID())); + ei->modifikatoren_.Zeige(ch->second.ID())->Wert(ch->second.Stufe()); + hatHerausragendeEigenschaft = true; + } + if (!hatHerausragendeEigenschaft) + ei->modifikatoren_.Loesche(strings::MacheID("CharakteristikumHerausragendeEigenschaft", ID())); // Miserable Eigenschaft - s = _t("Miserable Eigenschaft"); - if (person_->charakteristika_.Existiert(s + " " + ID())) { - if (!modifikatoren_.Existiert(s)) - ei->modifikatoren_.FuegeEin(Modifikator(-1, s)); - } else - if (modifikatoren_.Existiert(s)) - ei->modifikatoren_.Loesche(s); + bool hatMiserableEigenschaft = false; + forallconst (Charakteristika, ch, person_->charakteristika_) + if (ch->second.Definition()->IstMiserableEigenschaft()) + if (ch->second.Definition()->MiserableEigenschaft() == Art()) { + if (!modifikatoren_.Existiert(ch->second.ID())) + ei->modifikatoren_.FuegeEin(Modifikator(1, ch->second.ID())); + ei->modifikatoren_.Zeige(ch->second.ID())->Wert(ch->second.Stufe()); + hatMiserableEigenschaft = true; + } + if (!hatMiserableEigenschaft) + ei->modifikatoren_.Loesche(strings::MacheID("CharakteristikumMiserableEigenschaft", ID())); } return modifikatoren_.Verrechne(wert_); } // Wert - //@nonl //@-node:Wert //@+node:Text std::string Eigenschaft::Text() { @@ -89,11 +142,11 @@ //@+node:Lese int Eigenschaft::Lese(PersistenzManager* pm, const std::string& id) { std::string geleseneID = id; - int rv = pm->OeffneZumLesen(_t("Eigenschaft"), geleseneID); + int rv = pm->OeffneZumLesen(("Eigenschaft"), geleseneID); int wert; - rv += pm->Lese(_t("Basiswert"), wert); + rv += pm->Lese(("Basiswert"), wert); int max; - rv += pm->Lese(_t("Maximalwert"), max); + rv += pm->Lese(("Maximalwert"), max); Modifikatoren modifikatoren; rv += modifikatoren.Lese(pm); // TODO kein zweiter Parameter? if (!rv) { @@ -110,10 +163,10 @@ //@-node:Lese //@+node:Schreibe int Eigenschaft::Schreibe(PersistenzManager* pm) const { - int rv = pm->OeffneZumSchreiben(_t("Eigenschaft"), ID()); - rv += pm->Schreibe(_t("Wert"), Wert()); - rv += pm->Schreibe(_t("Basiswert"), Basiswert()); - rv += pm->Schreibe(_t("Maximalwert"), Maximalwert()); + int rv = pm->OeffneZumSchreiben(("Eigenschaft"), ID()); + rv += pm->Schreibe(("Wert"), Wert()); + rv += pm->Schreibe(("Basiswert"), Basiswert()); + rv += pm->Schreibe(("Maximalwert"), Maximalwert()); rv += modifikatoren_.Schreibe(pm); @@ -124,13 +177,13 @@ //@nonl //@-node:Schreibe //@+node:Pruefe - int Eigenschaft::Pruefe() const { + int Eigenschaft::Pruefe() { int rv = 0; if (Wert()>Maximalwert()) { - Log::Info(_t("Wert größer als Maximalwert")); + Log::Info(("Wert größer als Maximalwert")); ++rv; } - if (rv!=0) Log::Info(_t("in") + " " + ID()); + if (rv!=0) Log::Info("in " + ID()); return rv; } // Pruefe //@nonl @@ -152,6 +205,14 @@ //@<< Version History >> //@+node:<< Version History >> // $Log$ +// Revision 1.10 2004/10/17 19:12:39 vrandezo +// IDs und Bezeichner getrennt - I18N vorbereitet +// ACHTUNG! Daten sichern. Das Programm ist noch reichlich fehlerhaft. +// Aber Entwicklung ohne CVS wird mir zu doof. +// Vorsicht vor allem mit Helden und RKP. +// Tausend Kleinigkeiten geaendert. +// Neue Datensaetze in basis.xdi. +// // Revision 1.9 2004/04/13 21:45:45 vrandezo // Akademische Ausbildung (Magier) implementiert // Aufräumarbeiten (besser in Leo integriert) Index: Eigenschaft.h =================================================================== RCS file: /cvsroot/darkeyetool/det/src/dsa/Eigenschaft.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Eigenschaft.h 13 Apr 2004 21:45:45 -0000 1.8 +++ Eigenschaft.h 17 Oct 2004 19:12:39 -0000 1.9 @@ -11,15 +11,62 @@ //@<< header >> //@+node:<< header >> //@+at -// The content of this file is subject to the license -// given in license.txt +// Copyright (c) 2002-2004, Zdenko Denny Vrandecic and +// contributors. +// All rights reserved. +// (The license follows closely the new +// BSD-OpenSource-License) // +// Redistribution and use in source and binary forms, with +// or without +// modification, are permitted provided that the following +// conditions are met: +// Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the +// following disclaimer in the documentation +// and/or other materials provided with the distribution. +// Neither the name of the copyrightholder or one of the +// contributers to this source may be used to endorse or +// promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// If you use this source, please inform me, so I can keep +// track of how useful it really is. That would be very +// appreciated. +// +// The data distributed with this code is copyrighted by +// Fantasy Production, Erkrath, Germany, and *not* subject +// to the here given license. Distributing and using this +// data is granted by FanPro for the purpose of using +// computer driven tools for the role playing game "Das +// Schwarze Auge" / "The Dark Eye". Any other use is only +// allowed with prior written permission by FanPro. //@-at //@@c #ifdef MSVC #pragma warning(disable:4786 4503) #endif + //@-node:<< header >> //@nl @@ -68,7 +115,7 @@ int Lese(PersistenzManager* pm, const std::string& id = ""); int Schreibe(PersistenzManager* pm) const; - int Pruefe() const; + int Pruefe(); static int IDListe(PersistenzManager* pm, StringListe* liste); // sollte versteckt werden (Demeter) @@ -91,6 +138,14 @@ //@<< Version History >> //@+node:<< Version History >> // $Log$ +// Revision 1.9 2004/10/17 19:12:39 vrandezo +// IDs und Bezeichner getrennt - I18N vorbereitet +// ACHTUNG! Daten sichern. Das Programm ist noch reichlich fehlerhaft. +// Aber Entwicklung ohne CVS wird mir zu doof. +// Vorsicht vor allem mit Helden und RKP. +// Tausend Kleinigkeiten geaendert. +// Neue Datensaetze in basis.xdi. +// // Revision 1.8 2004/04/13 21:45:45 vrandezo // Akademische Ausbildung (Magier) implementiert // Aufräumarbeiten (besser in Leo integriert) Index: Wuerfel.h =================================================================== RCS file: /cvsroot/darkeyetool/det/src/dsa/Wuerfel.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Wuerfel.h 13 Apr 2004 21:45:45 -0000 1.4 +++ Wuerfel.h 17 Oct 2004 19:12:40 -0000 1.5 @@ -13,15 +13,62 @@ //@<< header >> //@+node:<< header >> //@+at -// The content of this file is subject to the license -// given in license.txt +// Copyright (c) 2002-2004, Zdenko Denny Vrandecic and +// contributors. +// All rights reserved. +// (The license follows closely the new +// BSD-OpenSource-License) +// +// Redistribution and use in source and binary forms, with +// or without +// modification, are permitted provided that the following +// conditions are met: +// Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the +// following disclaimer in the documentation +// and/or other materials provided with the distribution. +// Neither the name of the copyrightholder or one of the +// contributers to this source may be used to endorse or +// promote products derived from this software without +// specific prior written permission. // +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// If you use this source, please inform me, so I can keep +// track of how useful it really is. That would be very +// appreciated. +// +// The data distributed with this code is copyrighted by +// Fantasy Production, Erkrath, Germany, and *not* subject +// to the here given license. Distributing and using this +// data is granted by FanPro for the purpose of using +// computer driven tools for the role playing game "Das +// Schwarze Auge" / "The Dark Eye". Any other use is only +// allowed with prior written permission by FanPro. //@-at //@@c #ifdef MSVC #pragma warning(disable:4786 4503) #endif + //@-node:<< header >> //@nl @@ -65,6 +112,14 @@ //@<< Version History >> //@+node:<< Version History >> // $Log$ +// Revision 1.5 2004/10/17 19:12:40 vrandezo +// IDs und Bezeichner getrennt - I18N vorbereitet +// ACHTUNG! Daten sichern. Das Programm ist noch reichlich fehlerhaft. +// Aber Entwicklung ohne CVS wird mir zu doof. +// Vorsicht vor allem mit Helden und RKP. +// Tausend Kleinigkeiten geaendert. +// Neue Datensaetze in basis.xdi. +// // Revision 1.4 2004/04/13 21:45:45 vrandezo // Akademische Ausbildung (Magier) implementiert // Aufräumarbeiten (besser in Leo integriert) Index: Voraussetzung.h =================================================================== RCS file: /cvsroot/darkeyetool/det/src/dsa/Voraussetzung.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Voraussetzung.h 11 Apr 2004 21:13:06 -0000 1.7 +++ Voraussetzung.h 17 Oct 2004 19:12:40 -0000 1.8 @@ -11,15 +11,62 @@ //@<< header >> //@+node:<< header >> //@+at -// The content of this file is subject to the license -// given in license.txt +// Copyright (c) 2002-2004, Zdenko Denny Vrandecic and +// contributors. +// All rights reserved. +// (The license follows closely the new +// BSD-OpenSource-License) +// +// Redistribution and use in source and binary forms, with +// or without +// modification, are permitted provided that the following +// conditions are met: +// Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the +// following disclaimer in the documentation +// and/or other materials provided with the distribution. +// Neither the name of the copyrightholder or one of the +// contributers to this source may be used to endorse or +// promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// If you use this source, please inform me, so I can keep +// track of how useful it really is. That would be very +// appreciated. // +// The data distributed with this code is copyrighted by +// Fantasy Production, Erkrath, Germany, and *not* subject +// to the here given license. Distributing and using this +// data is granted by FanPro for the purpose of using +// computer driven tools for the role playing game "Das +// Schwarze Auge" / "The Dark Eye". Any other use is only +// allowed with prior written permission by FanPro. //@-at //@@c #ifdef MSVC #pragma warning(disable:4786 4503) #endif + //@-node:<< header >> //@nl @@ -40,8 +87,8 @@ class Person; class Voraussetzungen; - //@ << class Voraussetzung >> - //@+node:<< class Voraussetzung >> + //@ @+others + //@+node:class Voraussetzung class Voraussetzung { public: Voraussetzung(const std::string& id= "") @@ -51,8 +98,8 @@ ~Voraussetzung(); - static std::string Klasse() { return _t("Voraussetzung"); } - static std::string Klassen() { return _t("Voraussetzungen"); } + static std::string Klasse() { return ("Voraussetzung"); } + static std::string Klassen() { return ("Voraussetzungen"); } void ID(const std::string& id) { id_ = id; } std::string ID() const { return id_; } @@ -91,7 +138,7 @@ //@+node:<< Lese/Schreibe >> int Lese(PersistenzManager* pm, const std::string& id = ""); int Schreibe(PersistenzManager* pm) const; - int Pruefe() const; + int Pruefe(); static int IDListe(PersistenzManager* pm, StringListe* liste); //@nonl //@-node:<< Lese/Schreibe >> @@ -109,15 +156,13 @@ Voraussetzungen* alternativ_; bool ErfuelltPrivat(const Person& person) const; + std::string TextID(const std::string&) const; //@nonl //@-node:<< private >> //@nl }; // Voraussetzung - //@-node:<< class Voraussetzung >> - //@nl - - //@ << class Voraussetzungen >> - //@+node:<< class Voraussetzungen >> + //@-node:class Voraussetzung + //@+node:class Voraussetzungen class Voraussetzungen : public Menge<Voraussetzung> { public: Voraussetzungen(const std::string& id = "") : Menge<Voraussetzung>(id) {} @@ -125,8 +170,8 @@ bool Erfuellt(const Person& person) const; }; // Voraussetzungen //@nonl - //@-node:<< class Voraussetzungen >> - //@nl + //@-node:class Voraussetzungen + //@-others } @@ -135,6 +180,14 @@ //@<< Version History >> //@+node:<< Version History >> // $Log$ +// Revision 1.8 2004/10/17 19:12:40 vrandezo +// IDs und Bezeichner getrennt - I18N vorbereitet +// ACHTUNG! Daten sichern. Das Programm ist noch reichlich fehlerhaft. +// Aber Entwicklung ohne CVS wird mir zu doof. +// Vorsicht vor allem mit Helden und RKP. +// Tausend Kleinigkeiten geaendert. +// Neue Datensaetze in basis.xdi. +// // Revision 1.7 2004/04/11 21:13:06 vrandezo // Voraussetzungen koennen jetzt mit "oder" verknuepft werden // @@ -231,5 +284,6 @@ //@nonl //@-node:<< Version History >> //@nl + //@-node:@file Voraussetzung.h //@-leo Index: Kampftechnik.h =================================================================== RCS file: /cvsroot/darkeyetool/det/src/dsa/Kampftechnik.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Kampftechnik.h 23 Apr 2004 13:18:45 -0000 1.12 +++ Kampftechnik.h 17 Oct 2004 19:12:39 -0000 1.13 @@ -11,15 +11,62 @@ //@<< header >> //@+node:<< header >> //@+at -// The content of this file is subject to the license -// given in license.txt +// Copyright (c) 2002-2004, Zdenko Denny Vrandecic and +// contributors. +// All rights reserved. +// (The license follows closely the new +// BSD-OpenSource-License) +// +// Redistribution and use in source and binary forms, with +// or without +// modification, are permitted provided that the following +// conditions are met: +// Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the +// following disclaimer in the documentation +// and/or other materials provided with the distribution. +// Neither the name of the copyrightholder or one of the +// contributers to this source may be used to endorse or +// promote products derived from this software without +// specific prior written permission. // +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +// CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +// PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// If you use this source, please inform me, so I can keep +// track of how useful it really is. That would be very +// appreciated. +// +// The data distributed with this code is copyrighted by +// Fantasy Production, Erkrath, Germany, and *not* subject +// to the here given license. Distributing and using this +// data is granted by FanPro for the purpose of using +// computer driven tools for the role playing game "Das +// Schwarze Auge" / "The Dark Eye". Any other use is only +// allowed with prior written permission by FanPro. //@-at //@@c #ifdef MSVC #pragma warning(disable:4786 4503) #endif + //@-node:<< header >> //@nl @@ -30,82 +77,63 @@ //@+node:<< includes >> #include "NDSABasis.h" #include "Menge.h" -#include "Texte.h" #include "Regeln.h" #include "Auswahl.h" -//@nonl +#include "Definition.h" //@-node:<< includes >> //@nl namespace DSA { - class PersistenzManager; - //@ << KampftechnikDefinition >> - //@+node:<< KampftechnikDefinition >> - class KampftechnikDefinition { + //@ @+others + //@+node:KampftechnikDefinition + class KampftechnikDefinition : public Definition { public: - KampftechnikDefinition(const std::string& id = "") : id_(id), eBE_("-"), skt_(D) {} - static std::string Klasse() { return _t("Kampftechnik"); } - static std::string Klassen() { return _t("Kampftechniken"); } + KampftechnikDefinition(const std::string& id = "") : Definition(id), eBE_(KeineBE), skt_(D) {} + static std::string Klasse() { return ("Kampftechnik"); } + virtual std::string VirtuelleKlasse() const { return Klasse(); } + static std::string Klassen() { return ("Kampftechniken"); } typedef Kampfart Kriterium; - static std::string Kriteriumsart() { return _t("Kampfart"); } - static std::string Kriteriumstring(Kampfart kampfart) { return KampfartString(kampfart); } + static std::string Kriteriumsart() { return ("Kampfart"); } + static std::string Kriteriumstring(Kampfart kampfart) { return KampfartString(kampfart, false); } static Kampfart Kriteriumstring(std::string s) { return KampfartString(s); } Kampfart ZuKriterium() const { return KampfArt(); } bool IstKriterium(Kampfart art) const { return KampfArt() == art; } void SetzeKriterium(Kampfart art) { KampfArt(art); } - - void ID(const std::string& id) { id_ = id; } - std::string ID() const { return id_; } + void Art(Talentart art) { art_ = art; } Talentart Art() const { return art_; } void KampfArt(Kampfart art) { kampfart_ = art; } Kampfart KampfArt() const { return kampfart_; } void SKTSpalte_(SKTSpalte skt) { skt_ = skt; } SKTSpalte SKTSpalte_() const { return skt_; } - void EffektiveBehinderung(const std::string& ebe) { eBE_ = ebe; } - std::string EffektiveBehinderung() const { return eBE_; } - void Beschreibung(const std::string& beschreibung) { beschreibung_ = beschreibung; } - std::string Beschreibung() const { return beschreibung_; } + void EffektiveBehinderung(EBe ebe) { eBE_ = ebe; } + EBe EffektiveBehinderung() const { return eBE_; } bool operator==(const KampftechnikDefinition& other) const - { return ((id_==other.id_) + { return ((Definition::operator==(other)) && (art_==other.art_) && (kampfart_==other.kampfart_) && (skt_==other.skt_) - && (eBE_==other.eBE_) - && (beschreibung_==other.beschreibung_)); } + && (eBE_==other.eBE_)); } bool operator!=(const KampftechnikDefinition& other) const { return !operator==(other); } // std::string Text() const; int Lese(PersistenzManager* pm, const std::string& id = ""); int Schreibe(PersistenzManager* pm) const; - int Pruefe() const; + int Pruefe(); static int IDListe(PersistenzManager* pm, StringListe* liste); private: - std::string id_; Talentart art_; Kampfart kampfart_; SKTSpalte skt_; - std::string eBE_; - std::string beschreibung_; + EBe eBE_; }; // KampftechnikDefinition - //@nonl - //@-node:<< KampftechnikDefinition >> - //@nl - - class KampftechnikDefinitionen : public SortierteMenge<KampftechnikDefinition> { - }; // KampftechnikDefinitionen - - KampftechnikDefinitionen* kampftechniken(); - - class Person; - - //@ << Kampftechnik >> - //@+node:<< Kampftechnik >> + //@-node:KampftechnikDefinition + //@+node:Kampftechnik class Kampftechnik { public: Kampftechnik(const std::string& id = "", int wert = 0) : person_(0), wert_(wert), id_(id), autoAufteilenATPA_(true), aufAT_(0) {} @@ -113,8 +141,8 @@ Kampftechnik(const KampftechnikDefinition* const def, int wert = 0) : person_(0), wert_(wert), id_(def->ID()), autoAufteilenATPA_(true), aufAT_(0) {} void Bezugsperson(Person* p) { person_=p; } - static std::string Klasse() { return _t("Kampftechnik"); } - static std::string Klassen() { return _t("Kampftechniken"); } + static std::string Klasse() { return ("Kampftechnik"); } + static std::string Klassen() { return ("Kampftechniken"); } typedef int Kriterium; // wird für die Auswahl benötigt, ignorieren @@ -157,7 +185,7 @@ int Lese(PersistenzManager* pm, const std::string& id = ""); int Schreibe(PersistenzManager* pm) const; - int Pruefe() const; + int Pruefe(); static int IDListe(PersistenzManager* pm, StringListe* liste); private: @@ -168,8 +196,15 @@ bool autoAufteilenATPA_; }; // Kampftechnik //@nonl - //@-node:<< Kampftechnik >> - //@nl + //@-node:Kampftechnik + //@-others + + class KampftechnikDefinitionen : public SortierteMenge<KampftechnikDefinition> { + }; // KampftechnikDefinitionen + + KampftechnikDefinitionen* kampftechniken(); + + class Person; typedef Menge<Kampftechnik> Kampftechniken; //class Kampftechniken : public Menge<Kampftechnik> { @@ -184,6 +219,14 @@ //@<< Version History >> //@+node:<< Version History >> // $Log$ +// Revision 1.13 2004/10/17 19:12:39 vrandezo +// IDs und Bezeichner getrennt - I18N vorbereitet +// ACHTUNG! Daten sichern. Das Programm ist noch reichlich fehlerhaft. +// Aber Entwicklung ohne CVS wird mir zu doof. +// Vorsicht vor allem mit Helden und RKP. +// Tausend Kleinigkeiten geaendert. +// Neue Datensaetze in basis.xdi. +// // Revision 1.12 2004/04/23 13:18:45 vrandezo // Absturz bei Bauern - skt_ nicht initialisiert (Bugmeldung Twel u.a.) // Index: Kultur.cpp =================================================================== RCS file: /cvsroot/darkeyetool/det/src/dsa/Kultur.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Kultur.cpp 29 Jan 2004 09:06:18 -0000 1.12 +++ Kultur.cpp 17 Oct 2004 19:12:39 -0000 1.13 @@ -11,18 +11,64 @@ //@<< header >> //@+node:<< header >> //@+at -// The content of this file is subject to the license -// given in license.txt +// Copyright (c) 2002-2004, Zdenko Denny Vrandecic and +// contributors. +// All rights reserved. +// (The license follows closely the new +// BSD-OpenSource-License) // +// Redistribution and use in source and binary forms, with +// or without +// modification, are permitted provided that the following +// conditions are met: +// Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following di... [truncated message content] |