Commit 659c640b authored by Mathieu Faverge's avatar Mathieu Faverge

All entityvalues and Entitytype are now indexed by aliases instead of the full Name structure

parent 423247fd
......@@ -609,7 +609,7 @@ void Settings_window::on_reload_link_types_palette_btn_clicked() {
}
add_table_line(link_types_table, SLOT(link_types_color_changed(const QColor&)), SLOT(link_types_visible_changed(int)),
row, lt->get_name().to_string(), color, true);
row, lt->get_alias(), color, true);
}
_reload_links = true;
......@@ -643,7 +643,7 @@ void Settings_window::on_reload_event_types_palette_btn_clicked() {
}
add_table_line(event_types_table, SLOT(event_types_color_changed(const QColor&)), SLOT(event_types_visible_changed(int)),
row, et->get_name().to_string(), color, true);
row, et->get_alias(), color, true);
}
_reload_events = true;
}
......
......@@ -1050,7 +1050,7 @@ void Render_alternate::end_draw_arrows(){
//send datas to vbo
std::map<EntityValue*, std::pair<Vbo*, Vbo*> >::iterator it = _arrows.begin();
while(it != _arrows.end()){
std::cout << it->first->get_name().get_name() << std::endl;
std::cout << it->first->get_name() << std::endl;
it->second.first->config(_glsl);
it->second.second->config(_glsl);
it++;
......@@ -1090,7 +1090,7 @@ void Render_alternate::end_draw_events(){
_draw_event = false;
std::map<EntityValue*, std::pair<Vbo*, Vbo*> >::iterator it = _events.begin();
while(it != _events.end()){
std::cout << it->first->get_name().get_name() << std::endl;
std::cout << it->first->get_name() << std::endl;
it->second.first->config(_glsl);
it->second.second->config(_glsl);
it++;
......
......@@ -155,7 +155,7 @@ public:
// Draw the variable name
draw_object->draw_text(this->_pos_x_container_name,
this->_pos_y_container_name + 50 - pos_y,
var->get_type()->get_name().to_string());
var->get_type()->get_name());
// Draw the axis
draw_object->draw_axis(pos_x,
......
This diff is collapsed.
......@@ -6,13 +6,13 @@
** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
......@@ -23,7 +23,7 @@
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
......@@ -37,7 +37,7 @@
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
** - VUCHENER Clément
**
*/
/*!
......@@ -53,7 +53,7 @@
*/
template<class T>
class DrawVDiagram : public DrawStats<T> {
public:
/*
* \brief The default constructor
......@@ -63,7 +63,7 @@ public:
set_geometrical_informations();
}
/*!
* \brief The destructor
*/
......@@ -90,9 +90,9 @@ public:
for(int i = 0 ; i < number_of_containers ; i ++) {
draw_container_name(draw_object, i);
draw_diagram(draw_object, i);
draw_legend(draw_object, i);
}
this->set_geometrical_informations_object(draw_object);
......@@ -107,12 +107,12 @@ public:
*/
virtual void draw_container_name(T* draw_object, const int container_id) const {
// Get the position for the i-th container name
const Element_pos pos_x = this->_pos_x_container_name;
const Element_pos pos_y = this->_size_for_one_container*(container_id+1)-this->_pos_y_container_name;
const std::string name = this->_containers_to_print[container_id]->get_name().to_string();
draw_object->draw_text(pos_x, pos_y, name);
}
......@@ -130,47 +130,44 @@ public:
// Printing of the trace
int pos_x = _START_HISTOGRAM_X_DEFAULT;
int pos_y = _START_HISTOGRAM_Y_DEFAULT - container_id*this->_size_for_one_container;
const double max_percentage = get_max_percentage(temp_states);
// Draw axes
draw_object->draw_axis(pos_x, pos_y, _WIDTH_HISTOGRAM_DEFAULT*(this->_states[container_id].size()+1), this->_percentage_height_default*100);
int pos_x = _START_HISTOGRAM_X_DEFAULT;
int pos_y = _START_HISTOGRAM_Y_DEFAULT - container_id*this->_size_for_one_container;
const double max_percentage = get_max_percentage(temp_states);
// Draw axes
draw_object->draw_axis(pos_x, pos_y, _WIDTH_HISTOGRAM_DEFAULT*(this->_states[container_id].size()+1), this->_percentage_height_default*100);
draw_object->draw_text(pos_x-35,
draw_object->draw_text(pos_x-35,
this->_size_for_one_container-(pos_y+this->_percentage_height_default*100-5),
QString::number(max_percentage*100., 'g', 3).toStdString()+"%");
draw_object->draw_horizontal_line(pos_x, pos_y+this->_percentage_height_default*100, _WIDTH_HISTOGRAM_DEFAULT*(this->_states[container_id].size()+1));
// Draw the stats
for (std::map<const EntityValue *, stats *>::iterator it = temp_states.begin();
it != temp_states.end();
it ++) {
std::string name = (*it).first->get_name().to_string();
// We have to convert the percentage in a rectangle and print it
const double length = (*it).second->_total_length;
const double height = length*100.*this->_percentage_height_default/(this->_end_time-this->_start_time);
// We search for a color
if((*it).first->get_extra_fields()->find(std::string("Color")) != (*it).first->get_extra_fields()->end()) {
draw_object->draw_horizontal_line(pos_x, pos_y+this->_percentage_height_default*100, _WIDTH_HISTOGRAM_DEFAULT*(this->_states[container_id].size()+1));
// Draw the stats
for (std::map<const EntityValue *, stats *>::iterator it = temp_states.begin();
it != temp_states.end();
it ++) {
// We have to convert the percentage in a rectangle and print it
const double length = (*it).second->_total_length;
const double height = length*100.*this->_percentage_height_default/(this->_end_time-this->_start_time);
// We search for a color
if((*it).first->get_extra_fields()->find(std::string("Color")) != (*it).first->get_extra_fields()->end()) {
const Color *color = (const Color *)(*it).first->get_extra_fields()->find(std::string("Color"))->second;
draw_object->draw_rect(pos_x, pos_y, _WIDTH_HISTOGRAM_DEFAULT, height/max_percentage, color->get_red(), color->get_green(), color->get_blue());
}
else {
}
else {
draw_object->draw_rect(pos_x, pos_y, _WIDTH_HISTOGRAM_DEFAULT, height/max_percentage, 0.7, 0.7, 0.75);
}
// We print the percentage above
draw_object->draw_text(pos_x,
}
// We print the percentage above
draw_object->draw_text(pos_x,
this->_size_for_one_container-(pos_y+height/max_percentage+1),
QString::number(length/(this->_end_time-this->_start_time)*100., 'f', 1).toStdString()+"%");
//std::cout << "State : " << name << " for " << (*it).second->_total_length*100./(this->_end_time-this->_start_time)<< "% between " << this->_start_time << " sec and " << this->_end_time << " sec" << std::endl;
pos_x += _WIDTH_HISTOGRAM_DEFAULT;
}
pos_x += _WIDTH_HISTOGRAM_DEFAULT;
}
// We check for the width
if(pos_x > this->_max_width){
......@@ -198,7 +195,9 @@ public:
for (std::map<const EntityValue *, stats *>::iterator it = this->_states[container_id].begin();
it != this->_states[container_id].end();
it ++, decalage ++) {
std::string name = (*it).first->get_name().to_string();
std::string name = (*it).first->get_name();
// We cut the name to don't exceed the place
draw_object->draw_text(pos_x+w+_POS_X_LEGEND_DEFAULT, pos_y, name.substr(0, 10));
......@@ -228,7 +227,7 @@ public:
}
/*!
/*!
* \fn get_max_percentage(std::map<const EntityValue*, stats*> &temp_states) const
* \brief Get the biggest percentage of times for all the stats
* \param temp_states The stats where we want to get the longest
......@@ -252,16 +251,16 @@ public:
}
/*!
/*!
* \fn set_geometrical_informations()
* \brief Set some infos for the displaying
*/
void set_geometrical_informations() {
this->_pos_x_container_name = _POS_X_CONTAINER_NAME;
this->_pos_y_container_name = this->_size_for_one_container - 50;
this->_percentage_height_default = (this->_size_for_one_container - _START_HISTOGRAM_Y_DEFAULT - 20) / 100.;
/* Size for rectangles in the legend */
this->_width_for_rect_legend = 20.;
this->_height_for_rect_legend = 15.;
......@@ -269,5 +268,5 @@ public:
}
};
#endif
......@@ -172,7 +172,7 @@ void Stats_window::set_trace(Trace *trace) {
for (it = states_types_list->begin();
it != end;
it++){
string name = (*it).second->get_name().to_string();
string name = (*it).second->get_alias();
QString temp(QString::fromStdString(name));
_kind_of_state_box->addItem(temp);
}
......@@ -189,7 +189,7 @@ void Stats_window::set_selected_nodes(string kind_of_state){
for (itstat = states_types_list->begin();
itstat != endstat;
itstat++){
if ((*itstat).second->get_name().to_string() == kind_of_state){
if ((*itstat).second->get_alias() == kind_of_state){
kind_of_container = (*itstat).second->get_container_type();
continue;
}
......
......@@ -642,10 +642,10 @@ public:
while (ancestor) {
if ((link = get_link(ancestor, x, y, d))) {
*Message::get_instance() << "<center><strong>Link</strong></center>"
<< "<strong>Value:</strong> " << link->get_value()->get_name().to_string() << "<br />"
<< "<strong>Value:</strong> " << link->get_value()->get_name() << "<br />"
<< "<strong>Source:</strong> " << link->get_source()->get_name().to_string() << "<br />"
<< "<strong>Destination:</strong> " << link->get_destination()->get_name().to_string() << "<br />"
<< "<strong>Type:</strong> " << link->get_type()->get_name().to_string() << "<br />"
<< "<strong>Type:</strong> " << link->get_type()->get_name() << "<br />"
<< "<strong>Date:</strong> " << link->get_start_time().get_value() << " - " << link->get_end_time().get_value() << "<br />"
<< "<strong>Duration:</strong> " << link->get_duration() << "<br />";
print_extra_fields("Link", link->get_extra_fields());
......@@ -661,10 +661,10 @@ public:
//if not found, the link may hav been assigned to the first root container.
if ((link = get_link(root_containers->front(), x, y, d))) {
*Message::get_instance() << "<center><strong>Link</strong></center>"
<< "<strong>Value:</strong> " << link->get_value()->get_name().to_string() << "<br />"
<< "<strong>Value:</strong> " << link->get_value()->get_name() << "<br />"
<< "<strong>Source:</strong> " << link->get_source()->get_name().to_string() << "<br />"
<< "<strong>Destination:</strong> " << link->get_destination()->get_name().to_string() << "<br />"
<< "<strong>Type:</strong> " << link->get_type()->get_name().to_string() << "<br />"
<< "<strong>Type:</strong> " << link->get_type()->get_name() << "<br />"
<< "<strong>Date:</strong> " << link->get_start_time().get_value() << " - " << link->get_end_time().get_value() << "<br />"
<< "<strong>Duration:</strong> " << link->get_duration() << "<br />";
print_extra_fields("Link", link->get_extra_fields());
......@@ -684,9 +684,9 @@ public:
if (!Info::Render::_no_events)
if ((event = find_event(container, x, d))) {
*Message::get_instance() << "<center><strong>Event</strong></center>"
<< "<strong>Value:</strong> " << event->get_value()->get_name().to_string() << "<br />"
<< "<strong>Value:</strong> " << event->get_value()->get_name() << "<br />"
<< "<strong>Container:</strong> " << event->get_container()->get_name().to_string() << "<br />"
<< "<strong>Type:</strong> " << event->get_type()->get_name().to_string() << "<br />"
<< "<strong>Type:</strong> " << event->get_type()->get_name() << "<br />"
<< "<strong>Date:</strong> " << event->get_time().get_value() << "<br />";
print_extra_fields("Event", event->get_extra_fields());
print_extra_fields("Value", event->get_value()->get_extra_fields());
......@@ -696,9 +696,9 @@ public:
}
if ((state = find_state(container, x))) {
*Message::get_instance() << "<center><strong>State</strong></center>"
<< "<strong>Value:</strong> " << state->get_value()->get_name().to_string() << "<br />"
<< "<strong>Value:</strong> " << state->get_value()->get_name() << "<br />"
<< "<strong>Container:</strong> " << state->get_container()->get_name().to_string() << "<br />"
<< "<strong>Type:</strong> " << state->get_type()->get_name().to_string() << "<br />"
<< "<strong>Type:</strong> " << state->get_type()->get_name() << "<br />"
<< "<strong>Date:</strong> " << state->get_start_time().get_value() << " - " << state->get_end_time().get_value() << "<br />"
<< "<strong>Duration:</strong> " << state->get_duration() << "<br />";
print_extra_fields("State", state->get_extra_fields());
......@@ -725,7 +725,7 @@ public:
variable = (*i).second;
*Message::get_instance() << "<center><strong>Variable</strong></center>"
<< "<strong>Container:</strong> " << variable->get_container()->get_name().to_string() << "<br />"
<< "<strong>Type:</strong> " << variable->get_type()->get_name().to_string() << "<br />"
<< "<strong>Type:</strong> " << variable->get_type()->get_name() << "<br />"
<< "<strong>Value:</strong> " << variable->get_value_at(x) << "<br />"
<< "<strong>Value:</strong> " << variable->get_value_at(x) << "<br />"
<< "<strong>Min:</strong> " << variable->get_min().get_value() << "<br />"
......
......@@ -64,14 +64,52 @@ EntityType::EntityType(EntityClass_t ec, Name name,
}
}
EntityType::~EntityType(){
// Destruction of the list _values
// As long as everything has not been cleaned
{
std::map<std::string, EntityValue*>::iterator it = _values.begin();
std::map<std::string, EntityValue*>::iterator itend = _values.end();
for( ; it != itend; it++ )
{
delete (it->second);
}
_values.clear();
}
_container_type = NULL;
if(_extra_fields != NULL) {
map<std::string, Value*>::iterator it = _extra_fields->begin();
map<std::string, Value*>::iterator itend = _extra_fields->end();
for( ; it != itend; it++ )
{
delete (it->second);
}
_extra_fields->clear();
}
}
void EntityType::add_value(EntityValue *value) {
_values.insert ( pair<Name , EntityValue*>(value->get_name(),value));
_values.insert ( pair<std::string, EntityValue*>(value->get_alias(),
value) );
}
const Name EntityType::get_name() const {
const Name
EntityType::get_Name() const {
return _name;
}
const std::string
EntityType::get_name() const {
return _name.get_name();
}
const std::string
EntityType::get_alias() const {
return _name.get_alias();
}
const EntityClass_t EntityType::get_class() const {
return _class;
}
......@@ -80,46 +118,24 @@ const ContainerType *EntityType::get_container_type() const {
return _container_type;
}
const std::map<Name, EntityValue* > *EntityType::get_values() const {
const std::map<std::string, EntityValue*> *EntityType::get_values() const {
return &_values;
}
void EntityType::set_name(Name name){
_name=name;
}
void EntityType::set_container_type(ContainerType* container_type){
_container_type=container_type;
}
void EntityType::set_extra_fields(std::map<std::string, Value *>* extra_fields){
_extra_fields=extra_fields;
_name = name;
}
void EntityType::set_values(std::map<Name, EntityValue* > values){
_values=values;
}
void EntityType::set_container_type(ContainerType *container_type){
_container_type = container_type;
}
EntityType::~EntityType(){
// Destruction of the list _values
// As long as everything has not been cleaned
std::map<Name, EntityValue* >::iterator cur1 = _values.end();
for(std::map<Name, EntityValue* >::iterator it1 = _values.begin();
it1 != cur1;
it1++){
delete ((*it1).second);
}
_values.clear();
void EntityType::set_extra_fields(std::map<std::string, Value*> *extra_fields){
_extra_fields = extra_fields;
}
_container_type = NULL;
if(_extra_fields!=NULL){
map<std::string , Value * >::iterator cur = _extra_fields->end();
for(map<std::string, Value *>::iterator it = _extra_fields->begin();
it != cur;
it++){
delete (*it).second;
}
_extra_fields->clear();
}
void EntityType::set_values(std::map<std::string, EntityValue*> values){
_values = values;
}
map<std::string, Value *> *EntityType::get_extra_fields() const {
......
/*
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A 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-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - COULOMB Kevin
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
**
*/
** This file is part of the ViTE project.
**
** This software is governed by the CeCILL-A 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-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms.
**
**
** ViTE developers are (for version 0.* to 1.0):
**
** - COULOMB Kevin
** - FAVERGE Mathieu
** - JAZEIX Johnny
** - LAGRASSE Olivier
** - MARCOUEILLE Jule
** - NOISETTE Pascal
** - REDONDY Arthur
** - VUCHENER Clément
**
*/
#ifndef ENTITYTYPE_HPP
#define ENTITYTYPE_HPP
......@@ -61,11 +61,11 @@ class EntityValue;
*/
class EntityType {
private:
EntityClass_t _class; /* Class of EntityType: State, Link, Event or Variable */
Name _name;
ContainerType *_container_type;
std::map<Name, EntityValue* > _values;
std::map<std::string, Value *>* _extra_fields;
EntityClass_t _class; /* Class of EntityType: State, Link, Event or Variable */
Name _name;
ContainerType *_container_type;
std::map<std::string, EntityValue* > _values;
std::map<std::string, Value *>* _extra_fields;
protected:
......@@ -97,7 +97,9 @@ public:
* \fn get_name() const
* \brief Get the name of the entity type
*/
const Name get_name() const;
const Name get_Name() const;
const std::string get_name() const;
const std::string get_alias() const;
const EntityClass_t get_class() const;
......@@ -111,20 +113,18 @@ public:
* \fn get_values() const
* \brief Get the list of the values
*/
const std::map<Name, EntityValue* > *get_values() const;
const std::map<std::string, EntityValue* > *get_values() const;
/*!
* \fn get_extra_fields() const
* \brief Get the extra fields
*/
std::map<std::string, Value *> *get_extra_fields() const;
void set_name(Name name);
void set_container_type(ContainerType* container_type);
void set_extra_fields(std::map<std::string, Value *>* extra_fields);
void set_values(std::map<Name, EntityValue* > values);
std::map<std::string, Value *> *get_extra_fields() const;
void set_name(Name name);
void set_container_type(ContainerType* container_type);
void set_extra_fields(std::map<std::string, Value*> *extra_fields);
void set_values(std::map<std::string, EntityValue*> values);
};
#endif
......@@ -132,11 +132,25 @@ EntityValue::EntityValue(const Name &name, EntityType *type, map<std::string, Va
// _usedcolor = _filecolor;
// }
Name EntityValue::get_name() const {
//std::cout << "get_name" << std::endl;
Name
EntityValue::get_Name() const
{
return _name;
}
std::string
EntityValue::get_name() const
{
return _name.get_name();
}
std::string
EntityValue::get_alias() const
{
return _name.get_alias();
}
const EntityType *EntityValue::get_type() const {
return _type;
}
......
......@@ -77,7 +77,10 @@ public:
* \fn get_name() const
* \brief Get the name of the value
*/
Name get_name() const;
Name get_Name() const;
std::string get_name() const;
std::string get_alias() const;
/*!
* \fn get_type() const
......
......@@ -132,19 +132,19 @@ Trace::~Trace()
// Delete state types
for(std::map<std::string, StateType* >::iterator it=_state_types.begin(); it !=_state_types.end(); it++)
delete (*it).second;
delete it->second;
// Delete event types
for(std::map<std::string, EventType* >::iterator it=_event_types.begin(); it !=_event_types.end(); it++)
delete (*it).second;
delete it->second;
// Delete link types
for(std::map<std::string, LinkType* >::iterator it=_link_types.begin(); it !=_link_types.end(); it++)
delete (*it).second;
delete it->second;
// Delete variable types
for(std::map<std::string, VariableType* >::iterator it=_variable_types.begin(); it !=_variable_types.end(); it++)
delete (*it).second;
delete it->second;
_state_types.clear();
_event_types.clear();
......@@ -333,7 +333,7 @@ void Trace::reset_state(Date &time, StateType *type, Container *container, map<s
void Trace::new_event(Date &time, EventType *type, Container *container, map<string, Value *> &opt) {
if (container && type) {
EntityValue *EV = search_entity_value( (type->get_name()).to_String(), type );
EntityValue *EV = search_entity_value( type->get_alias(), type, false );
container->new_event(time, type, EV, opt);
}
......@@ -374,8 +374,13 @@ void Trace::sub_variable(Date &time, VariableType *type, Container *container, D
delete_opt(opt);
}
void Trace::start_link(Date &time, LinkType *type, Container *ancestor, Container *source, /*EntityValue *value, */String key, map<string, Value *> &opt) {
EntityValue* EV = search_entity_value( (type->get_name()).to_String(), type );
void
Trace::start_link(Date &time, LinkType *type,
Container *ancestor, Container *source,
String key, map<string, Value *> &opt)
{
EntityValue* EV = search_entity_value( type->get_alias(), type, false );
if (ancestor && type && source)
ancestor->start_link(time, type, source, EV, key, opt);
......@@ -383,7 +388,11 @@ void Trace::start_link(Date &time, LinkType *type, Container *ancestor, Containe
_max_date = time;
}
void Trace::end_link(Date &time, LinkType *type, Container *ancestor, Container *destination, /*EntityValue *value, */String key, map<string, Value *> &opt) {
void
Trace::end_link(Date &time, LinkType *type,
Container *ancestor, Container *destination,
String key, map<string, Value *> &opt)
{
if (ancestor && type && destination)
ancestor->end_link(time, destination, key, opt);
......@@ -751,7 +760,7 @@ Container *Trace::search_container(String name) const {
EventType *Trace::search_event_type(String name) const {
std::map<std::string, EventType*>::const_iterator it = _event_types.find(name.to_string());
if (it != _event_types.end() ) {
return (((*it).second));
return ((it->second));
}
return 0;
......@@ -759,19 +768,19 @@ EventType *Trace::search_event_type(String name) const {
StateType *Trace::search_state_type(String name) const {
std::map<std::string, StateType*>::const_iterator it = _state_types.find(name.to_string());
if (it != _state_types.end() ) return (((*it).second));
if (it != _state_types.end() ) return ((it->second));
return 0;
}
VariableType *Trace::search_variable_type(String name) const {
std::map<std::string, VariableType*>::const_iterator it = _variable_types.find(name.to_string());
if (it != _variable_types.end() ) return (((*it).second));
if (it != _variable_types.end() ) return ((it->second));
return 0;
}
LinkType *Trace::search_link_type(String name) const {
std::map<std::string, LinkType*>::const_iterator it = _link_types.find(name.to_string());
if (it != _link_types.end() ) return (((*it).second));
if (it != _link_types.end() ) return ((it->second));
return 0;
}
......@@ -780,7 +789,7 @@ EntityType *Trace::search_entity_type(String name) const {
//Search the State Type
std::map<std::string, StateType*>::const_iterator it = _state_types.find(name.to_string());
if ( it != _state_types.end() )
return (((*it).second));
return ((it->second));