proxygen
global_counter Struct Reference

Public Member Functions

 global_counter ()
 
void increase ()
 
void decrease ()
 
unsigned count () const
 

Private Attributes

unsigned count_
 

Detailed Description

Definition at line 27 of file ArenaSmartPtrTest.cpp.

Constructor & Destructor Documentation

global_counter::global_counter ( )
inline

Definition at line 28 of file ArenaSmartPtrTest.cpp.

28 : count_(0) {}

Member Function Documentation

unsigned global_counter::count ( ) const
inline

Definition at line 38 of file ArenaSmartPtrTest.cpp.

Referenced by shared_ptr_test(), and unique_ptr_test().

38  {
39  return count_;
40  }
void global_counter::decrease ( )
inline

Definition at line 33 of file ArenaSmartPtrTest.cpp.

References EXPECT_GT.

33  {
34  EXPECT_GT(count_, 0);
35  --count_;
36  }
#define EXPECT_GT(val1, val2)
Definition: gtest.h:1934
void global_counter::increase ( )
inline

Definition at line 30 of file ArenaSmartPtrTest.cpp.

30  {
31  ++count_;
32  }

Member Data Documentation

unsigned global_counter::count_
private

Definition at line 43 of file ArenaSmartPtrTest.cpp.


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