typedef s_container s_container_t;
//--------------------------------------------------
-class paje_event;
-typedef paje_event *paje_event_t;
+class PajeEvent;
+typedef PajeEvent *paje_event_t;
-class paje_event {
+class PajeEvent {
public:
double timestamp;
e_event_type event_type;
virtual void print(){};
void *data;
- virtual ~paje_event();
+ virtual ~PajeEvent();
};
-typedef paje_event s_paje_event_t;
+typedef PajeEvent s_paje_event_t;
-class DefineContainerEvent : public paje_event
+class DefineContainerEvent : public PajeEvent
{
public:
type_t type;
//--------------------------------------------------
-class DefineVariableTypeEvent : public paje_event
+class DefineVariableTypeEvent : public PajeEvent
{
public:
type_t type;
};
//--------------------------------------------------
-class DefineStateTypeEvent : public paje_event {
+class DefineStateTypeEvent : public PajeEvent {
type_t type;
public:
DefineStateTypeEvent(type_t type);
void print();// override;
};
-class DefineEventTypeEvent : public paje_event {
+class DefineEventTypeEvent : public PajeEvent {
type_t type;
public:
DefineEventTypeEvent(type_t type);
void print() override;
};
-class DefineLinkTypeEvent : public paje_event {
+class DefineLinkTypeEvent : public PajeEvent {
type_t type;
type_t source;
type_t dest;
void print() override;
};
-class DefineEntityValueEvent : public paje_event {
+class DefineEntityValueEvent : public PajeEvent {
val_t value;
public:
DefineEntityValueEvent (val_t type);
void print() override;
};
-class CreateContainerEvent : public paje_event {
+class CreateContainerEvent : public PajeEvent {
public:
container_t container;
explicit CreateContainerEvent (container_t container);
void print() override;
};
-class DestroyContainerEvent : public paje_event {
+class DestroyContainerEvent : public PajeEvent {
public:
container_t container;
DestroyContainerEvent (container_t container);
};
-class SetVariableEvent : public paje_event {
+class SetVariableEvent : public PajeEvent {
container_t container;
type_t type;
double value;
};
-class AddVariableEvent:public paje_event {
+class AddVariableEvent:public PajeEvent {
container_t container;
type_t type;
double value;
//--------------------------------------------------
-class SubVariableEvent : public paje_event {
+class SubVariableEvent : public PajeEvent {
public:
container_t container;
type_t type;
};
//--------------------------------------------------
-class SetStateEvent : public paje_event {
+class SetStateEvent : public PajeEvent {
public:
container_t container;
type_t type;
};
-class PushStateEvent : public paje_event {
+class PushStateEvent : public PajeEvent {
public:
container_t container;
type_t type;
void print() override;
};
-class PopStateEvent : public paje_event {
+class PopStateEvent : public PajeEvent {
container_t container;
type_t type;
xbt_dynar_t extra;
void print() override;
};
-class ResetStateEvent : public paje_event {
+class ResetStateEvent : public PajeEvent {
container_t container;
type_t type;
public:
void print() override;
};
-class StartLinkEvent : public paje_event {
+class StartLinkEvent : public PajeEvent {
public:
container_t container;
type_t type;
void print() override;
};
-class EndLinkEvent : public paje_event {
+class EndLinkEvent : public PajeEvent {
container_t container;
type_t type;
container_t destContainer;
};
-class NewEvent : public paje_event {
+class NewEvent : public PajeEvent {
public:
container_t container;
type_t type;
std::vector<paje_event_t>::reverse_iterator i;
for (i = buffer.rbegin(); i != buffer.rend(); ++i) {
paje_event_t e1 = *i;
+ XBT_DEBUG("compare to %p is of type %d; timestamp:%f", e1,
+ (int)e1->event_type, e1->timestamp);
if (e1->timestamp <= tbi->timestamp)
break;
}
buffer.insert(i.base(), tbi);
if (i == buffer.rend())
XBT_DEBUG("%s: inserted at beginning", __FUNCTION__);
+ else if (i == buffer.rbegin())
+ XBT_DEBUG("%s: inserted at end", __FUNCTION__);
else
- XBT_DEBUG("%s: inserted at%s %zd", __FUNCTION__, (i == buffer.rbegin()) ? " end" :"pos =",
- std::distance(buffer.rend(),i));
+ XBT_DEBUG("%s: inserted at pos= %zd from its end", __FUNCTION__,
+ std::distance(buffer.rbegin(),i));
}
-paje_event:: ~paje_event()
+PajeEvent:: ~PajeEvent()
{
- XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, timestamp);
+ XBT_DEBUG("%s not implemented: event_type=%d, timestamp=%f", __FUNCTION__, (int)event_type, timestamp);
/* switch (event->event_type){
case PAJE_StartLink: