Page Speed Optimization Libraries
1.13.35.1
|
#include "statistics_template.h"
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 |
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.
|
inlinevirtual |
Return some name representing the variable, provided that the specific implementation has some sensible way of doing so.
Implements net_instaweb::Variable.