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

Public Member Functions

 Cascade (const tweet &twt, const std::string &key)
 Construct a new Cascade object from a tweet (std::string) and a key (std::string) More...
 
 Cascade (const Cascade &process)=default
 Construct a new Cascade object by copy. More...
 
 Cascade (Cascade &&process)=default
 Construct a new Cascade object by displacement (move) More...
 
Cascadeoperator= (const Cascade &process)=default
 Overload operateur = to construct a new Cascade object by recopy. More...
 
Cascadeoperator= (Cascade &&process)=default
 Overload operateur = to construct a new Cascade object by recopying the right value. More...
 
 ~Cascade ()
 Destroy the Cascade object.
 
std::string getId () const
 Get the Id object. More...
 
std::string getMsg () const
 Get the Msg object. More...
 
timestamp getTimeOfFirstTweet () const
 Get the Time Of First Tweet object. More...
 
timestamp getTimeOfLastTweet () const
 Get the Time Of Last Tweet object. More...
 
std::vector< std::pair< timestamp, int > > getpairsOfTimesAndMagnitudes () const
 Get the pair (Times, magnitude) from a Cascade object. More...
 
source::idf getSource () const
 Get the Source object. More...
 
void addTweetToCascade (const tweet &twt, const std::string &key)
 Add a tweet to a cascade object. More...
 
void operator+= (std::pair< tweet, std::string > &elt)
 Overload operator += to add a tweet and its key to a cascade. More...
 
bool operator< (const cascade_ref &ref_other_cascade) const
 Overload operator < to compare the cascade object from its sharepointer reference with another reference of a cascade. More...
 

Friends

class Processor
 
struct CascadeRefComaparator
 
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

◆ Cascade() [1/3]

tweetoscope::cascade::Cascade::Cascade ( const tweet twt,
const std::string &  key 
)
inline

Construct a new Cascade object from a tweet (std::string) and a key (std::string)

Parameters
twt
key

◆ Cascade() [2/3]

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

Construct a new Cascade object by copy.

Parameters
process

◆ Cascade() [3/3]

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

Construct a new Cascade object by displacement (move)

Parameters
process

Member Function Documentation

◆ addTweetToCascade()

void tweetoscope::cascade::Cascade::addTweetToCascade ( const tweet twt,
const std::string &  key 
)
inline

Add a tweet to a cascade object.

Parameters
twt
key

◆ getId()

std::string tweetoscope::cascade::Cascade::getId ( ) const
inline

Get the Id object.

Returns
std::string

◆ getMsg()

std::string tweetoscope::cascade::Cascade::getMsg ( ) const
inline

Get the Msg object.

Returns
std::string

◆ getpairsOfTimesAndMagnitudes()

std::vector< std::pair< timestamp, int > > tweetoscope::cascade::Cascade::getpairsOfTimesAndMagnitudes ( ) const
inline

Get the pair (Times, magnitude) from a Cascade object.

Returns
std::vector<std::pair<timestamp, int> >

◆ getSource()

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

Get the Source object.

Returns
source::idf

◆ getTimeOfFirstTweet()

timestamp tweetoscope::cascade::Cascade::getTimeOfFirstTweet ( ) const
inline

Get the Time Of First Tweet object.

Returns
timestamp

◆ getTimeOfLastTweet()

timestamp tweetoscope::cascade::Cascade::getTimeOfLastTweet ( ) const
inline

Get the Time Of Last Tweet object.

Returns
timestamp

◆ operator+=()

void tweetoscope::cascade::Cascade::operator+= ( std::pair< tweet, std::string > &  elt)
inline

Overload operator += to add a tweet and its key to a cascade.

Parameters
elt

◆ operator<()

bool tweetoscope::cascade::Cascade::operator< ( const cascade_ref &  ref_other_cascade) const
inline

Overload operator < to compare the cascade object from its sharepointer reference with another reference of a cascade.

Parameters
ref_other_cascade
Returns
true
false

◆ operator=() [1/2]

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

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

Parameters
process
Returns
Cascade&

◆ operator=() [2/2]

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

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

Parameters
process
Returns
Cascade&

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: