Construct version 5.4.4
An agent based modeling framework
Reddit::reddit_moderator Struct Reference

Class for the behavior of moderators on Reddit. More...

Inheritance diagram for Reddit::reddit_moderator:
Collaboration diagram for Reddit::reddit_moderator:

Public Member Functions

 reddit_moderator (Social_Media_no_followers *media, const Node &node)
 Loads node attributes of the agent into values for the class. More...
 
Redditmedia ()
 
void generate_post_events (void)
 The moderator checks and removes posts/comments from their subreddits. More...
 
unsigned int get_read_count (void)
 No Operation More...
 
void parse (media_event *_event)
 No Operation More...
 
void repost (media_event *_event)
 No Operation More...
 
void reply (media_event *_event)
 No Operation More...
 
void quote (media_event *_event)
 No Operation More...
 
std::set< media_event * > read (media_event *read_event)
 This user does not read events in the traditional way so an empty set is returned. More...
 
- Public Member Functions inherited from Social_Media_no_followers::media_user
Randomrandom ()
 
 media_user (Social_Media_no_followers *media)
 
virtual ~media_user ()
 
virtual void parse (media_event *read_event)=0
 Called during Social_Media_no_followers::communicate when an agent parses an event. This function is called once for every message. More...
 
virtual void reply (media_event *read_event)=0
 Called after media_user::parse only if this agent posseses the knowledge in the read event. This function should create a reply based on the implementation's conditions. More...
 
virtual void quote (media_event *read_event)=0
 Called after media_user::parse only if this agent posseses the knowledge in the read event. This function should create a quote based on the implementation's conditions. More...
 
virtual void repost (media_event *read_event)=0
 Called after media_user::parse only if this agent posseses the knowledge in the read event and read_event::type equals media_event::event_types::post. This function should create a repost based on the implementation's conditions. More...
 
virtual void generate_post_events (void)=0
 Called during Social_Media_no_followers::think. Function should generate post events using Social_Media_no_followers::create_post. More...
 
virtual unsigned int get_read_count (void)=0
 Called during Social_Media_no_followers::think to determine how many events to read in a user's feed. More...
 
virtual std::set< media_event * > read (media_event *read_event)=0
 Called during Social_Media_no_followers::think to determine which other events should be added to an InteractionMessage in addition to the read event. More...
 

Public Attributes

float delay
 The length of time required for the moderator to consider banning an event.
 
float threshold
 The lower limit for knowledge trust of a post that the moderator will consider banning.
 
unsigned int id
 This user's agent index.
 
- Public Attributes inherited from Social_Media_no_followers::media_user
Social_Media_no_followersmedia_ptr
 

Detailed Description

Class for the behavior of moderators on Reddit.

The class provides the framework for moderator agent descision making in the model environment.

Constructor & Destructor Documentation

◆ reddit_moderator()

Reddit::reddit_moderator::reddit_moderator ( Social_Media_no_followers media,
const Node node 
)

Loads node attributes of the agent into values for the class.

The following attributes are required:

  • "moderation_delay"
  • "moderation threshold"
  • Reddit + " user type"

Note that some of these are not used for the moderator's behavior.

Member Function Documentation

◆ generate_post_events()

void Reddit::reddit_moderator::generate_post_events ( void  )
virtual

The moderator checks and removes posts/comments from their subreddits.

Implements Social_Media_no_followers::media_user.

Here is the call graph for this function:

◆ get_read_count()

unsigned int Reddit::reddit_moderator::get_read_count ( void  )
inlinevirtual

No Operation

Implements Social_Media_no_followers::media_user.

◆ parse()

void Reddit::reddit_moderator::parse ( media_event _event)
inlinevirtual

No Operation

Implements Social_Media_no_followers::media_user.

◆ quote()

void Reddit::reddit_moderator::quote ( media_event _event)
inlinevirtual

No Operation

Implements Social_Media_no_followers::media_user.

◆ read()

std::set< media_event * > Reddit::reddit_moderator::read ( media_event read_event)
inlinevirtual

This user does not read events in the traditional way so an empty set is returned.

Implements Social_Media_no_followers::media_user.

◆ reply()

void Reddit::reddit_moderator::reply ( media_event _event)
inlinevirtual

No Operation

Implements Social_Media_no_followers::media_user.

◆ repost()

void Reddit::reddit_moderator::repost ( media_event _event)
inlinevirtual

No Operation

Implements Social_Media_no_followers::media_user.