Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
net_instaweb::Variable Class Referenceabstract

#include "statistics.h"

Inheritance diagram for net_instaweb::Variable:
net_instaweb::SplitVariable net_instaweb::VarTemplate< Impl > net_instaweb::VarTemplate< NullStatisticsVariable > net_instaweb::VarTemplate< SharedMemVariable > net_instaweb::VarTemplate< SimpleStatsVariable >

Public Member Functions

virtual int64 Get () const =0
 
virtual StringPiece GetName () const =0
 
int64 Add (int64 non_negative_delta)
 Adds 'delta' to the variable's value, returning the result.
 
virtual void Clear ()=0
 

Protected Member Functions

virtual int64 AddHelper (int64 delta)=0
 This is virtual so that subclasses can add platform-specific atomicity.
 

Detailed Description

Variables can normally only be increased, not decreased. However, for testing, They can also be Cleared.

Todo:
TODO(jmarantz): consider renaming this to Counter or maybe UpCounter.

Member Function Documentation

virtual StringPiece net_instaweb::Variable::GetName ( ) const
pure virtual

Return some name representing the variable, provided that the specific implementation has some sensible way of doing so.

Implemented in net_instaweb::VarTemplate< Impl >, net_instaweb::VarTemplate< SharedMemVariable >, net_instaweb::VarTemplate< NullStatisticsVariable >, net_instaweb::VarTemplate< SimpleStatsVariable >, and net_instaweb::SplitVariable.


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