proxygen
DataTracker< isRelocatable > Struct Template Reference
Inheritance diagram for DataTracker< isRelocatable >:
Tracker

Public Member Functions

 DataTracker () noexcept
 
 DataTracker (const DataTracker &o) noexcept
 
 DataTracker (DataTracker &&o) noexcept
 
 DataTracker (int uid) noexcept
 
 ~DataTracker () noexcept
 
DataTrackeroperator= (const DataTracker &o) noexcept
 
DataTrackeroperator= (DataTracker &&o) noexcept
 
void print (const std::string &fun)
 
- Public Member Functions inherited from Tracker
 Tracker (Tracker *self, int uid)
 

Additional Inherited Members

- Public Attributes inherited from Tracker
Trackerself
 
int uid
 
- Static Public Attributes inherited from Tracker
static int UID = 1234
 
static std::map< int, int > UIDCount
 
static int UIDTotal = 0
 
static std::map< const Tracker *, int > Locations
 
static bool Print = false
 

Detailed Description

template<bool isRelocatable>
struct DataTracker< isRelocatable >

Definition at line 501 of file StlVectorTest.cpp.

Constructor & Destructor Documentation

template<bool isRelocatable>
DataTracker< isRelocatable >::DataTracker ( )
inlinenoexcept

Definition at line 502 of file StlVectorTest.cpp.

502  : Tracker(this, UID++) {
503  UIDCount[uid]++;
504  UIDTotal++;
505  if (!isRelocatable) {
506  Locations[self] = uid;
507  }
508  print("Data()");
509  }
Tracker(Tracker *self, int uid)
static std::map< const Tracker *, int > Locations
static int UIDTotal
static std::map< int, int > UIDCount
static int UID
void print(const std::string &fun)
template<bool isRelocatable>
DataTracker< isRelocatable >::DataTracker ( const DataTracker< isRelocatable > &  o)
inlinenoexcept

Definition at line 510 of file StlVectorTest.cpp.

510  : Tracker(this, o.uid) {
511  UIDCount[uid]++;
512  UIDTotal++;
513  if (!isRelocatable) {
514  Locations[self] = uid;
515  }
516  print("Data(const Data&)");
517  }
Tracker(Tracker *self, int uid)
static std::map< const Tracker *, int > Locations
static int UIDTotal
static std::map< int, int > UIDCount
void print(const std::string &fun)
template<bool isRelocatable>
DataTracker< isRelocatable >::DataTracker ( DataTracker< isRelocatable > &&  o)
inlinenoexcept

Definition at line 518 of file StlVectorTest.cpp.

518  : Tracker(this, o.uid) {
519  UIDCount[uid]++;
520  UIDTotal++;
521  if (!isRelocatable) {
522  Locations[self] = uid;
523  }
524  print("Data(Data&&)");
525  }
Tracker(Tracker *self, int uid)
static std::map< const Tracker *, int > Locations
static int UIDTotal
static std::map< int, int > UIDCount
void print(const std::string &fun)
template<bool isRelocatable>
DataTracker< isRelocatable >::DataTracker ( int  uid)
inlineexplicitnoexcept

Definition at line 527 of file StlVectorTest.cpp.

527  : Tracker(this, uid) {
528  UIDCount[uid]++;
529  UIDTotal++;
530  if (!isRelocatable) {
531  Locations[self] = uid;
532  }
533  print("Data(int)");
534  }
Tracker(Tracker *self, int uid)
static std::map< const Tracker *, int > Locations
static int UIDTotal
static std::map< int, int > UIDCount
void print(const std::string &fun)
template<bool isRelocatable>
DataTracker< isRelocatable >::~DataTracker ( )
inlinenoexcept

Definition at line 536 of file StlVectorTest.cpp.

536  {
537  UIDCount[uid]--;
538  UIDTotal--;
539  if (!isRelocatable) {
540  Locations.erase(self);
541  }
542  print("~Data()");
543  uid = 0xdeadbeef;
544  self = (DataTracker*)0xfeebdaed;
545  }
static std::map< const Tracker *, int > Locations
static int UIDTotal
static std::map< int, int > UIDCount
void print(const std::string &fun)

Member Function Documentation

template<bool isRelocatable>
DataTracker& DataTracker< isRelocatable >::operator= ( const DataTracker< isRelocatable > &  o)
inlinenoexcept

Definition at line 547 of file StlVectorTest.cpp.

547  {
548  UIDCount[uid]--;
549  uid = o.uid;
550  UIDCount[uid]++;
551  if (!isRelocatable) {
552  Locations[self] = uid;
553  }
554  print("op=(const Data&)");
555  return *this;
556  }
static std::map< const Tracker *, int > Locations
static std::map< int, int > UIDCount
void print(const std::string &fun)
template<bool isRelocatable>
DataTracker& DataTracker< isRelocatable >::operator= ( DataTracker< isRelocatable > &&  o)
inlinenoexcept

Definition at line 557 of file StlVectorTest.cpp.

557  {
558  UIDCount[uid]--;
559  uid = o.uid;
560  UIDCount[uid]++;
561  if (!isRelocatable) {
562  Locations[self] = uid;
563  }
564  print("op=(Data&&)");
565  return *this;
566  }
static std::map< const Tracker *, int > Locations
static std::map< int, int > UIDCount
void print(const std::string &fun)
template<bool isRelocatable>
void DataTracker< isRelocatable >::print ( const std::string fun)
inline

Definition at line 568 of file StlVectorTest.cpp.

568  {
569  if (Print) {
570  std::cerr << std::setw(20) << fun << ": uid = " << std::setw(3) << uid;
571  if (!isRelocatable) {
572  std::cerr << ", self = " << self;
573  }
574  std::cerr << std::endl;
575  }
576  }
static bool Print
void fun()

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