![]() |
Projet d'Informatique 2012
Simulation générique de systèmes physiques simples : vers les machines de Rube Goldberg
|
Classe représentant un Parseur XML. Plus de détails...
#include <Parseur.h>
Fonctions membres publiques | |
Parseur (std::string const &adresse, Systeme *syst) | |
~Parseur () | |
void | extraire () |
Extrait les données du fichier XML et construit le Systeme en conséquences. | |
void | enregistrer () |
Enregistre le Systeme dans un fichier XML. | |
void | setAdresse (std::string const &adresse) |
Manipulateur pour Parseur::m_adresse. | |
Attributs publics statiques | |
static const std::string | SYSTEME = "Systeme" |
Balise Systeme. | |
static const std::string | OBJET_MOBILE = "ObjetMobile" |
Balise ObjetMobile. | |
static const std::string | OBSTACLE = "Obstacle" |
Balise Obstacle. | |
static const std::string | OBJET_COMPOSE = "ObjetCompose" |
Balise ObjetCompose. | |
static const std::string | CHAMP_FORCE = "ChampForces" |
Balise ChampForces. | |
static const std::string | POSITION = "Position" |
Balise Position. | |
static const std::string | VITESSE = "Vitesse" |
Balise Vitesse. | |
static const std::string | FORCE = "Force" |
Balise Force. | |
static const std::string | RAYON = "Rayon" |
Balise Rayon. | |
static const std::string | MASSE_VOLUMIQUE = "Masse_Volumique" |
Balise Masse_Volumique. | |
static const std::string | COULEUR = "Couleur" |
Balise Couleur. | |
static const std::string | ANGLE = "Angle" |
Balise Angle. | |
static const std::string | VITESSE_ANGULAIRE = "Vitesse_Angulaire" |
Balise Vitese_Angulaire. | |
static const std::string | DIRECTION = "Direction" |
Balise Direction. | |
static const std::string | ATTACHE = "Attache" |
Balise Attache. | |
static const std::string | LONGUEUR = "Longueur" |
Balise Longueur. | |
static const std::string | FROTTEMENT = "Frottement" |
Balise Frottement. | |
static const std::string | RAIDEUR = "Raideur" |
Balise Raideur. | |
static const std::string | ORIGINE = "Origine" |
Balise Origine. | |
static const std::string | NORMALE = "Normale" |
Balise Normale. | |
static const std::string | COEFFICIENT_REBOND = "Coefficient_Rebond" |
Balise Coefficient_Rebond. | |
static const std::string | LARGEUR = "Largeur" |
Balise Largeur. | |
static const std::string | HAUTEUR = "Hauteur" |
Balise Hauteur. | |
static const std::string | FACE_A = "FaceA" |
Balise Face_A. | |
static const std::string | FACE_B = "FaceB" |
Balise Face_B. | |
static const std::string | FACE_C = "FaceC" |
Balise Face_C. | |
static const std::string | FACE_D = "FaceD" |
Balise Face_D. | |
static const std::string | FACE_E = "FaceE" |
Balise Face_E. | |
static const std::string | FACE_F = "FaceF" |
Balise Face_F. | |
static const std::string | PROFONDEUR = "Profondeur" |
Balise Profondeur. | |
static const std::string | INTENSITE = "Intensite" |
Balise Intensite. | |
static const std::string | BALLE = "Balle" |
Balise Balle. | |
static const std::string | BALLE3D = "Balle3D" |
Balise Balle3D. | |
static const std::string | RESSORT = "Ressort" |
Balise Ressort. | |
static const std::string | RESSORT3D = "Ressort3D" |
Balise Ressort3D. | |
static const std::string | PENDULE = "Pendule" |
Balise Pendule. | |
static const std::string | PENDULE3D = "Pendule3D" |
Balise Pendule3D. | |
static const std::string | PLAN = "Plan" |
Balise Plan. | |
static const std::string | PLAN3D = "Plan3D" |
Balise Plan3D. | |
static const std::string | PLAN_FINI = "PlanFini" |
Balise Plan_Fini. | |
static const std::string | PLAN_FINI3D = "PlanFini3D" |
Balise Plan_Fini3D. | |
static const std::string | BRIQUE = "Brique" |
Balise Brique. | |
static const std::string | BRIQUE3D = "Brique3D" |
Balise Brique3D. | |
static const std::string | VENT = "Vent" |
Balise Vent. | |
static const std::string | CHAMP_FORCE_GLOBAL = "ChampForcesGlobal" |
Balise Champ_Forces_Global. | |
static const std::string | VENTILATEUR = "Ventilateur" |
Balise Ventilateur. | |
static const std::string | VENTILATEUR3D = "Ventilateur3D" |
Balise Ventilateur3D. | |
static const std::string | TRAMPOLINE = "Trampoline" |
Balise Trampoline. | |
static const std::string | TRAMPOLINE3D = "Trampoline3D" |
Balise Trampoline3D. | |
static const std::string | TABULATION = " " |
Chaîne de caractères " ". | |
Fonctions membres privées | |
double | lireDouble () |
Méthode de lecture d'un double. | |
Vecteur | lireVecteur3D () |
Méthode de lecture d'un Vecteur tridimensionnel. | |
Vecteur | lireVecteur1D () |
Méthode de lecture d'un Vecteur unidimensionnel. | |
Couleur | lireCouleur () |
Méthode de lecture d'une Couleur. | |
void | lireBalise () |
Méthode de lecture d'une balise. | |
void | sauterCommentaire () |
Méthode permettant de ne pas tenir compte de commentaire. | |
void | creerBalle () |
Créé une Balle à partir des données du fichier XML. | |
void | creerPendule () |
Créé un Pendule à partir des données du fichier XML. | |
void | creerRessort () |
Créé un Ressort à partir des données du fichier XML. | |
void | creerPlan () |
Créé un Plan à partir des données du fichier XML. | |
void | creerPlanFini () |
Créé un PlanFini à partir des données du fichier XML. | |
void | creerBrique () |
Créé une Brique à partir des données du fichier XML. | |
void | creerVent () |
Créé un Vent à partir des données du fichier XML. | |
void | creerChampForcesGlobal () |
Créé un ChampForcesGlobal à partir des données du fichier XML. | |
void | creerVentilateur () |
Créé un Ventilateur à partir des données du fichier XML. | |
void | creerTrampoline () |
Créé un Trampoline à partir des données du fichier XML. | |
void | creerBalle3D () |
Créé une Balle3D à partir des données du fichier XML. | |
void | creerPendule3D () |
Créé un Pendule3D à partir des données du fichier XML. | |
void | creerRessort3D () |
Créé un Ressort3D à partir des données du fichier XML. | |
void | creerPlan3D () |
Créé un Plan3D à partir des données du fichier XML. | |
void | creerPlanFini3D () |
Créé un PlanFini3D à partir des données du fichier XML. | |
void | creerBrique3D () |
Créé une Brique3D à partir des données du fichier XML. | |
void | creerVentilateur3D () |
Créé un Ventilateur3D à partir des données du fichier XML. | |
void | creerTrampoline3D () |
Créé un Trampoline3D à partir des données du fichier XML. | |
void | parcourirObjetMobile () |
Parcours le fichier XML pour trouver quel type d'ObjetMobile y est renseigné | |
void | parcourirObstacle () |
Parcours le fichier XML pour trouver quel type d'Obstacle y est renseigné | |
void | parcourirObjetCompose () |
Parcours le fichier XML pour trouver quel type d'ObjetCompose y est renseigné | |
void | parcourirChampForces () |
Parcours le fichier XML pour trouver quel type de ChampForces y est renseigné | |
Attributs privés | |
std::string | m_adresse |
Adresse du fichier XML. | |
std::ifstream | m_fichier |
Flux de lecture dans le fichier XML. | |
Systeme * | m_systeme |
Pointeur sur le Systeme sur lequel on travaille. | |
std::string | m_tampon |
Tampon contenant la dernière balise lue. |
Classe représentant un Parseur XML.
Parseur::Parseur | ( | std::string const & | adresse, |
Systeme * | syst | ||
) |
Parseur::~Parseur | ( | ) |
void Parseur::extraire | ( | ) |
Extrait les données du fichier XML et construit le Systeme en conséquences.
void Parseur::enregistrer | ( | ) |
Enregistre le Systeme dans un fichier XML.
void Parseur::setAdresse | ( | std::string const & | adresse | ) |
Manipulateur pour Parseur::m_adresse.
adresse | Nouvelle adresse pour le Parseur |
double Parseur::lireDouble | ( | ) | [private] |
Méthode de lecture d'un double.
Vecteur Parseur::lireVecteur3D | ( | ) | [private] |
Vecteur Parseur::lireVecteur1D | ( | ) | [private] |
void Parseur::lireBalise | ( | ) | [private] |
Méthode de lecture d'une balise.
Stock la balise dans Parseur::m_tampon
void Parseur::sauterCommentaire | ( | ) | [private] |
Méthode permettant de ne pas tenir compte de commentaire.
Utilisée lors de l'appel à Parseur::lireBalise()
void Parseur::creerBalle | ( | ) | [private] |
Créé une Balle à partir des données du fichier XML.
void Parseur::creerPendule | ( | ) | [private] |
Créé un Pendule à partir des données du fichier XML.
void Parseur::creerRessort | ( | ) | [private] |
Créé un Ressort à partir des données du fichier XML.
void Parseur::creerPlan | ( | ) | [private] |
Créé un Plan à partir des données du fichier XML.
void Parseur::creerPlanFini | ( | ) | [private] |
Créé un PlanFini à partir des données du fichier XML.
void Parseur::creerBrique | ( | ) | [private] |
Créé une Brique à partir des données du fichier XML.
void Parseur::creerVent | ( | ) | [private] |
Créé un Vent à partir des données du fichier XML.
void Parseur::creerChampForcesGlobal | ( | ) | [private] |
Créé un ChampForcesGlobal à partir des données du fichier XML.
void Parseur::creerVentilateur | ( | ) | [private] |
Créé un Ventilateur à partir des données du fichier XML.
void Parseur::creerTrampoline | ( | ) | [private] |
Créé un Trampoline à partir des données du fichier XML.
void Parseur::creerBalle3D | ( | ) | [private] |
Créé une Balle3D à partir des données du fichier XML.
void Parseur::creerPendule3D | ( | ) | [private] |
Créé un Pendule3D à partir des données du fichier XML.
void Parseur::creerRessort3D | ( | ) | [private] |
Créé un Ressort3D à partir des données du fichier XML.
void Parseur::creerPlan3D | ( | ) | [private] |
Créé un Plan3D à partir des données du fichier XML.
void Parseur::creerPlanFini3D | ( | ) | [private] |
Créé un PlanFini3D à partir des données du fichier XML.
void Parseur::creerBrique3D | ( | ) | [private] |
Créé une Brique3D à partir des données du fichier XML.
void Parseur::creerVentilateur3D | ( | ) | [private] |
Créé un Ventilateur3D à partir des données du fichier XML.
void Parseur::creerTrampoline3D | ( | ) | [private] |
Créé un Trampoline3D à partir des données du fichier XML.
void Parseur::parcourirObjetMobile | ( | ) | [private] |
Parcours le fichier XML pour trouver quel type d'ObjetMobile y est renseigné
void Parseur::parcourirObstacle | ( | ) | [private] |
Parcours le fichier XML pour trouver quel type d'Obstacle y est renseigné
void Parseur::parcourirObjetCompose | ( | ) | [private] |
Parcours le fichier XML pour trouver quel type d'ObjetCompose y est renseigné
void Parseur::parcourirChampForces | ( | ) | [private] |
Parcours le fichier XML pour trouver quel type de ChampForces y est renseigné
const string Parseur::SYSTEME = "Systeme" [static] |
Balise Systeme.
const string Parseur::OBJET_MOBILE = "ObjetMobile" [static] |
Balise ObjetMobile.
const string Parseur::OBSTACLE = "Obstacle" [static] |
Balise Obstacle.
const string Parseur::OBJET_COMPOSE = "ObjetCompose" [static] |
Balise ObjetCompose.
const string Parseur::CHAMP_FORCE = "ChampForces" [static] |
Balise ChampForces.
const string Parseur::POSITION = "Position" [static] |
Balise Position.
const string Parseur::VITESSE = "Vitesse" [static] |
Balise Vitesse.
const string Parseur::FORCE = "Force" [static] |
Balise Force.
const string Parseur::RAYON = "Rayon" [static] |
Balise Rayon.
const string Parseur::MASSE_VOLUMIQUE = "Masse_Volumique" [static] |
Balise Masse_Volumique.
const string Parseur::COULEUR = "Couleur" [static] |
Balise Couleur.
const string Parseur::ANGLE = "Angle" [static] |
Balise Angle.
const string Parseur::VITESSE_ANGULAIRE = "Vitesse_Angulaire" [static] |
Balise Vitese_Angulaire.
const string Parseur::DIRECTION = "Direction" [static] |
Balise Direction.
const string Parseur::ATTACHE = "Attache" [static] |
Balise Attache.
const string Parseur::LONGUEUR = "Longueur" [static] |
Balise Longueur.
const string Parseur::FROTTEMENT = "Frottement" [static] |
Balise Frottement.
const string Parseur::RAIDEUR = "Raideur" [static] |
Balise Raideur.
const string Parseur::ORIGINE = "Origine" [static] |
Balise Origine.
const string Parseur::NORMALE = "Normale" [static] |
Balise Normale.
const string Parseur::COEFFICIENT_REBOND = "Coefficient_Rebond" [static] |
Balise Coefficient_Rebond.
const string Parseur::LARGEUR = "Largeur" [static] |
Balise Largeur.
const string Parseur::HAUTEUR = "Hauteur" [static] |
Balise Hauteur.
const string Parseur::FACE_A = "FaceA" [static] |
Balise Face_A.
const string Parseur::FACE_B = "FaceB" [static] |
Balise Face_B.
const string Parseur::FACE_C = "FaceC" [static] |
Balise Face_C.
const string Parseur::FACE_D = "FaceD" [static] |
Balise Face_D.
const string Parseur::FACE_E = "FaceE" [static] |
Balise Face_E.
const string Parseur::FACE_F = "FaceF" [static] |
Balise Face_F.
const string Parseur::PROFONDEUR = "Profondeur" [static] |
Balise Profondeur.
const string Parseur::INTENSITE = "Intensite" [static] |
Balise Intensite.
const string Parseur::BALLE = "Balle" [static] |
Balise Balle.
const string Parseur::BALLE3D = "Balle3D" [static] |
Balise Balle3D.
const string Parseur::RESSORT = "Ressort" [static] |
Balise Ressort.
const string Parseur::RESSORT3D = "Ressort3D" [static] |
Balise Ressort3D.
const string Parseur::PENDULE = "Pendule" [static] |
Balise Pendule.
const string Parseur::PENDULE3D = "Pendule3D" [static] |
Balise Pendule3D.
const string Parseur::PLAN = "Plan" [static] |
Balise Plan.
const string Parseur::PLAN3D = "Plan3D" [static] |
Balise Plan3D.
const string Parseur::PLAN_FINI = "PlanFini" [static] |
Balise Plan_Fini.
const string Parseur::PLAN_FINI3D = "PlanFini3D" [static] |
Balise Plan_Fini3D.
const string Parseur::BRIQUE = "Brique" [static] |
Balise Brique.
const string Parseur::BRIQUE3D = "Brique3D" [static] |
Balise Brique3D.
const string Parseur::VENT = "Vent" [static] |
Balise Vent.
const string Parseur::CHAMP_FORCE_GLOBAL = "ChampForcesGlobal" [static] |
Balise Champ_Forces_Global.
const string Parseur::VENTILATEUR = "Ventilateur" [static] |
Balise Ventilateur.
const string Parseur::VENTILATEUR3D = "Ventilateur3D" [static] |
Balise Ventilateur3D.
const string Parseur::TRAMPOLINE = "Trampoline" [static] |
Balise Trampoline.
const string Parseur::TRAMPOLINE3D = "Trampoline3D" [static] |
Balise Trampoline3D.
const string Parseur::TABULATION = " " [static] |
Chaîne de caractères " ".
std::string Parseur::m_adresse [private] |
Adresse du fichier XML.
std::ifstream Parseur::m_fichier [private] |
Flux de lecture dans le fichier XML.
Systeme* Parseur::m_systeme [private] |
Pointeur sur le Systeme sur lequel on travaille.
std::string Parseur::m_tampon [private] |
Tampon contenant la dernière balise lue.