feisty meow concerns codebase  2.140
octopi::entity_data_bin Class Reference

Stores a set of infotons grouped by the entity that owns them. More...

#include <entity_data_bin.h>

Public Member Functions

 entity_data_bin (int max_bytes_per_entity)
 allows each entity in the bin to have "max_bytes_per_entity" bytes stored. More...
 
virtual ~entity_data_bin ()
 
 DEFINE_CLASS_NAME ("entity_data_bin")
 
int max_bytes_per_entity () const
 
void max_bytes_per_entity (int max_bytes_per)
 
int entities () const
 
int items_held () const
 
bool get_sizes (const octopus_entity &id, int &items, int &bytes)
 
bool add_item (infoton *to_add, const octopus_request_id &id)
 
infotonacquire_for_identifier (const octopus_request_id &id)
 
infotonacquire_for_entity (const octopus_entity &requester, octopus_request_id &id)
 
int acquire_for_entity (const octopus_entity &requester, infoton_list &items, int maximum_size)
 
infotonacquire_for_any (octopus_request_id &id)
 
basis::astring text_form () const
 
void clean_out_deadwood (int decay_interval=4 *basis::MINUTE_ms)
 

Friends

class monk_the_detective
 

Detailed Description

Stores a set of infotons grouped by the entity that owns them.

Definition at line 36 of file entity_data_bin.h.

Constructor & Destructor Documentation

◆ entity_data_bin()

octopi::entity_data_bin::entity_data_bin ( int  max_bytes_per_entity)

allows each entity in the bin to have "max_bytes_per_entity" bytes stored.

any storage attempts that would go beyond that limit are rejected.

Definition at line 149 of file entity_data_bin.cpp.

◆ ~entity_data_bin()

octopi::entity_data_bin::~entity_data_bin ( )
virtual

Definition at line 157 of file entity_data_bin.cpp.

References basis::WHACK().

Member Function Documentation

◆ acquire_for_any()

infoton * octopi::entity_data_bin::acquire_for_any ( octopus_request_id id)

◆ acquire_for_entity() [1/2]

int octopi::entity_data_bin::acquire_for_entity ( const octopus_entity requester,
infoton_list items,
int  maximum_size 
)

◆ acquire_for_entity() [2/2]

infoton * octopi::entity_data_bin::acquire_for_entity ( const octopus_entity requester,
octopus_request_id id 
)

◆ acquire_for_identifier()

infoton * octopi::entity_data_bin::acquire_for_identifier ( const octopus_request_id id)

Definition at line 362 of file entity_data_bin.cpp.

References DUMP_STATE, FUNCDEF, GRAB_LOCK, LOG, and NULL_POINTER.

Referenced by octopi::octopus::acquire_specific_result().

◆ add_item()

bool octopi::entity_data_bin::add_item ( infoton to_add,
const octopus_request_id id 
)

◆ clean_out_deadwood()

void octopi::entity_data_bin::clean_out_deadwood ( int  decay_interval = 4 * basis::MINUTE_ms)

◆ DEFINE_CLASS_NAME()

octopi::entity_data_bin::DEFINE_CLASS_NAME ( "entity_data_bin"  )

◆ entities()

int octopi::entity_data_bin::entities ( ) const

Definition at line 163 of file entity_data_bin.cpp.

References GRAB_LOCK.

◆ get_sizes()

bool octopi::entity_data_bin::get_sizes ( const octopus_entity id,
int &  items,
int &  bytes 
)

Definition at line 472 of file entity_data_bin.cpp.

References FUNCDEF, and GRAB_LOCK.

Referenced by cromp::cromp_server::get_sizes().

◆ items_held()

int octopi::entity_data_bin::items_held ( ) const
inline

Definition at line 59 of file entity_data_bin.h.

◆ max_bytes_per_entity() [1/2]

int octopi::entity_data_bin::max_bytes_per_entity ( ) const
inline

◆ max_bytes_per_entity() [2/2]

void octopi::entity_data_bin::max_bytes_per_entity ( int  max_bytes_per)
inline

Definition at line 49 of file entity_data_bin.h.

◆ text_form()

Friends And Related Function Documentation

◆ monk_the_detective

friend class monk_the_detective
friend

Definition at line 116 of file entity_data_bin.h.


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