Collector  1
Public Member Functions | Friends | List of all members
tweetoscope::cascade::Processor Class Reference

Public Member Functions

 Processor (const tweet &twt)
 Construct a new Processor object from a tweet. More...
 
 Processor (const Processor &process)=default
 Construct a new Processor object by copy. More...
 
 Processor (Processor &&process)=default
 Construct a new Processor object by displacement. More...
 
Processoroperator= (const Processor &process)=default
 Overload operateur = to construct a new Cascade object by recopy. More...
 
Processoroperator= (Processor &&process)=default
 Overload operateur = to construct a new Cascade object by recopying its right value. More...
 
 ~Processor ()
 Destroy the Processor object.
 
source::idf getSource () const
 Get the Source object. More...
 
timestamp getSourceTime () const
 Get the Source Time object. More...
 
priority_queue getPriorityQueue () const
 Get the Priority Queue object. More...
 
std::map< timestamp, std::queue< cascade_wref > > getFIFO () const
 Get the FIFO object. More...
 
std::map< std::string, cascade_wref > getSymbolTable () const
 Get the Symbol Table object. More...
 
void setSourceTime (const timestamp &src_time)
 Set the Source Time object. More...
 
void addToFIFO (const int &pos, const cascade_wref &weak_ref_cascade)
 Add a cascade of a tweet to the FIFO from its weak reference. More...
 
void addToSymbolTable (const std::string &key, const cascade_wref &weak_ref_cascade)
 Add a cascade of a tweet to the Symbole Table from its weak reference and the key of the tweet. More...
 
auto addToPriorityQueue (const cascade_ref &sh_ref_cascade)
 Add a cascade of a tweet to the Priority Queue from its the share pointer of the reference. More...
 
void decreasePriorityQueue (const priority_queue::handle_type &elt, const cascade_ref &sh_ref_cascade)
 Remove a Cascade of the Priority Queue from the share pointer that references the cascade object. More...
 
std::vector< std::string > sendPartialCascade (const std::vector< std::size_t > &obs)
 Method to send a serie which is a partial cascade. More...
 
std::vector< std::string > sendTerminatedCascade (timestamp &end_time, const std::size_t &min_size)
 Method to send properties which correspond to a terminated cascade. More...
 

Friends

class Cascade
 
std::ostream & operator<< (std::ostream &os, std::vector< std::pair< timestamp, int > > &time_magnitude)
 Overload operator << to add time and magnitude to an output to print. More...
 

Constructor & Destructor Documentation

◆ Processor() [1/3]

tweetoscope::cascade::Processor::Processor ( const tweet twt)
inline

Construct a new Processor object from a tweet.

Parameters
twt

◆ Processor() [2/3]

tweetoscope::cascade::Processor::Processor ( const Processor process)
default

Construct a new Processor object by copy.

Parameters
process

◆ Processor() [3/3]

tweetoscope::cascade::Processor::Processor ( Processor &&  process)
default

Construct a new Processor object by displacement.

Parameters
process

Member Function Documentation

◆ addToFIFO()

void tweetoscope::cascade::Processor::addToFIFO ( const int &  pos,
const cascade_wref &  weak_ref_cascade 
)
inline

Add a cascade of a tweet to the FIFO from its weak reference.

Parameters
pos
weak_ref_cascade

◆ addToPriorityQueue()

auto tweetoscope::cascade::Processor::addToPriorityQueue ( const cascade_ref &  sh_ref_cascade)
inline

Add a cascade of a tweet to the Priority Queue from its the share pointer of the reference.

Parameters
sh_ref_cascade
Returns
auto

◆ addToSymbolTable()

void tweetoscope::cascade::Processor::addToSymbolTable ( const std::string &  key,
const cascade_wref &  weak_ref_cascade 
)
inline

Add a cascade of a tweet to the Symbole Table from its weak reference and the key of the tweet.

Parameters
key
weak_ref_cascade

◆ decreasePriorityQueue()

void tweetoscope::cascade::Processor::decreasePriorityQueue ( const priority_queue::handle_type &  elt,
const cascade_ref &  sh_ref_cascade 
)
inline

Remove a Cascade of the Priority Queue from the share pointer that references the cascade object.

Parameters
elt
sh_ref_cascade

◆ getFIFO()

std::map< timestamp, std::queue< cascade_wref > > tweetoscope::cascade::Processor::getFIFO ( ) const
inline

Get the FIFO object.

Returns
std::map<timestamp, std::queue<cascade_wref> >

◆ getPriorityQueue()

priority_queue tweetoscope::cascade::Processor::getPriorityQueue ( ) const
inline

Get the Priority Queue object.

Returns
priority_queue

◆ getSource()

source::idf tweetoscope::cascade::Processor::getSource ( ) const
inline

Get the Source object.

Returns
source::idf

◆ getSourceTime()

timestamp tweetoscope::cascade::Processor::getSourceTime ( ) const
inline

Get the Source Time object.

Returns
timestamp

◆ getSymbolTable()

std::map< std::string, cascade_wref > tweetoscope::cascade::Processor::getSymbolTable ( ) const
inline

Get the Symbol Table object.

Returns
std::map<std::string, cascade_wref>

◆ operator=() [1/2]

Processor& tweetoscope::cascade::Processor::operator= ( const Processor process)
default

Overload operateur = to construct a new Cascade object by recopy.

Parameters
process
Returns
Processor&

◆ operator=() [2/2]

Processor& tweetoscope::cascade::Processor::operator= ( Processor &&  process)
default

Overload operateur = to construct a new Cascade object by recopying its right value.

Parameters
process
Returns
Processor&

◆ sendPartialCascade()

std::vector< std::string > tweetoscope::cascade::Processor::sendPartialCascade ( const std::vector< std::size_t > &  obs)
inline

Method to send a serie which is a partial cascade.

Parameters
obs
Returns
std::vector<std::string>

◆ sendTerminatedCascade()

std::vector< std::string > tweetoscope::cascade::Processor::sendTerminatedCascade ( timestamp &  end_time,
const std::size_t &  min_size 
)
inline

Method to send properties which correspond to a terminated cascade.

Parameters
end_time
min_size
Returns
std::vector<std::string>

◆ setSourceTime()

void tweetoscope::cascade::Processor::setSourceTime ( const timestamp &  src_time)
inline

Set the Source Time object.

Parameters
src_time

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
std::vector< std::pair< timestamp, int > > &  time_magnitude 
)
friend

Overload operator << to add time and magnitude to an output to print.

Parameters
os
time_magnitude
Returns
std::ostream&

The documentation for this class was generated from the following file: