mirror of
http://172.16.200.102/MOISE/Timed-Altarica-To-Fiacre-Translator.git
synced 2025-12-03 10:07:58 +01:00
76 lines
2.5 KiB
C++
76 lines
2.5 KiB
C++
|
|
/*******************************************************************************
|
|||
|
|
* Copyright (c) 2015-2016 ONERA.
|
|||
|
|
* Ce logiciel est la propriété de l’ONERA (the French Aerospace Lab).
|
|||
|
|
* Tous droits réservés.
|
|||
|
|
*
|
|||
|
|
* Ce programme et les éléments qui l'accompagnent sont mis à disposition
|
|||
|
|
* aux conditions définies par le contrat de licence logiciel CeCILL-C soumise
|
|||
|
|
* au droit français et respectant les principes de diffusion des logiciels libres.
|
|||
|
|
* Vous pouvez utiliser, modifier et/ou redistribuer ce programme
|
|||
|
|
* sous les conditions de la licence CeCILL-C (http://www.cecill.info).
|
|||
|
|
|
|||
|
|
* This software is property of ONERA (the French Aerospace Lab).
|
|||
|
|
* All rights reserved.
|
|||
|
|
*
|
|||
|
|
* This program and the accompanying materials are made available under
|
|||
|
|
* the terms of the CeCILL-C license under French law and
|
|||
|
|
* abiding by the rules of distribution of free software.
|
|||
|
|
* You can use, modify and/ or redistribute the software under the terms of
|
|||
|
|
* the CeCILL-C license (http://www.cecill.info).
|
|||
|
|
*
|
|||
|
|
* Contributeurs/contributors:
|
|||
|
|
* Guillaume Infantes (ONERA - Centre de Toulouse) - initial API and implementation
|
|||
|
|
*
|
|||
|
|
*******************************************************************************/
|
|||
|
|
|
|||
|
|
#ifndef ALTA_STRUCT_DOMAIN_H_
|
|||
|
|
#define ALTA_STRUCT_DOMAIN_H_
|
|||
|
|
|
|||
|
|
#include "DiscreteDomain.hh"
|
|||
|
|
#include <map>
|
|||
|
|
#include <vector>
|
|||
|
|
|
|||
|
|
namespace epoch {
|
|||
|
|
namespace altarica {
|
|||
|
|
|
|||
|
|
//! Structured Domain
|
|||
|
|
/*!
|
|||
|
|
Stucture pour stocker les types complexes d'altarica
|
|||
|
|
*/
|
|||
|
|
class StructuredDomain : public DiscreteDomain {
|
|||
|
|
|
|||
|
|
protected:
|
|||
|
|
|
|||
|
|
//! les types sont stockes dans une map id->type
|
|||
|
|
std::map<std::string, Domain*> sdomain_;
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
|
|||
|
|
//! constructeur qui ne fait rien
|
|||
|
|
StructuredDomain();
|
|||
|
|
|
|||
|
|
//! ajout des domaines, cas ou on a plusieurs id pour 1 domaine
|
|||
|
|
void addDomains(std::vector<std::string>* domainNames, Domain* domain);
|
|||
|
|
|
|||
|
|
//! ajout d'un domaine au type structure
|
|||
|
|
void addDomain(std::string domainName, Domain *domain);
|
|||
|
|
|
|||
|
|
void addMyDomainsTo(StructuredDomain * sd);
|
|||
|
|
|
|||
|
|
//! calcule un index. attention aux debordements
|
|||
|
|
virtual unsigned int index(std::string arg) const;
|
|||
|
|
virtual std::string text(unsigned int index) const;
|
|||
|
|
|
|||
|
|
virtual std::vector<Variable*> * flatten(Variable* v) const;
|
|||
|
|
virtual Value * toValue() const;
|
|||
|
|
virtual int getMin() const;
|
|||
|
|
virtual int getMax() const;
|
|||
|
|
virtual Value * getValue(int i);
|
|||
|
|
virtual std::string toString() const;
|
|||
|
|
virtual ~StructuredDomain();
|
|||
|
|
};
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#endif
|