Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::VarTemplate< Impl > Class Template Reference

#include "statistics_template.h"

Inheritance diagram for net_instaweb::VarTemplate< Impl >:
net_instaweb::Variable

Public Member Functions

 VarTemplate (StringPiece name, Statistics *stats)
 
virtual int64 Get () const
 
virtual StringPiece GetName () const
 
virtual int64 AddHelper (int64 delta)
 This is virtual so that subclasses can add platform-specific atomicity.
 
virtual void Clear ()
 
Impl * impl ()
 
- Public Member Functions inherited from net_instaweb::Variable
int64 Add (int64 non_negative_delta)
 Adds 'delta' to the variable's value, returning the result.
 

Additional Inherited Members

Detailed Description

template<class Impl>
class net_instaweb::VarTemplate< Impl >

Helper class to create Variable interface implementations given a helper implementation class Impl. Note that the same Impl class can be used for UpDownTemplate, but Variable will not provide a Set method, and will DCHECK-fail on negative increments.

class Impl must define methods: Impl(StringPiece name, Statistics* stats); int64 Get(); StringPiece GetName(); int64 AddHelper(int64 delta); void Clear(); See ../util/simple_stats.h, class SimpleStatsVariable, for an example of an Impl class.

Member Function Documentation

template<class Impl>
virtual StringPiece net_instaweb::VarTemplate< Impl >::GetName ( ) const
inlinevirtual

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

Implements net_instaweb::Variable.


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