Add support for event with multiple causes

This commit is contained in:
manupap1 2014-11-11 22:08:55 +01:00
parent 217aafee5a
commit 5d5d9c5009
2 changed files with 11 additions and 0 deletions

View File

@ -210,6 +210,16 @@ void Event::createNotes( std::string &notes )
}
}
void Event::AddCause( const std::string new_cause )
{
if ( cause.find( new_cause ) == std::string::npos )
{
if ( cause.length() )
cause += ", ";
cause += new_cause;
}
}
int Event::sd = -1;
bool Event::OpenFrameSocket( int monitor_id )

View File

@ -132,6 +132,7 @@ public:
void AddFrames( int n_frames, Image **images, struct timeval **timestamps );
void AddFrame( Image *image, struct timeval timestamp, int score=0, Image *alarm_frame=NULL );
void AddCause( const std::string new_cause );
private:
void AddFramesInternal( int n_frames, int start_frame, Image **images, struct timeval **timestamps );