25 #ifndef LSST_DAF_BASE_CITIZEN_H 26 #define LSST_DAF_BASE_CITIZEN_H 41 class PersistentCitizenScope;
60 typedef memId (*memNewCallback)(
const memId cid);
70 void markPersistent(
void);
72 static int census(
int, memId startingMemId = 0);
76 static bool hasBeenCorrupted();
80 static memId getNextMemId();
82 static memId setNewCallbackId(memId
id);
83 static memId setDeleteCallbackId(memId
id);
84 static memNewCallback setNewCallback(memNewCallback func);
85 static memCallback setDeleteCallback(memCallback func);
86 static memCallback setCorruptionCallback(memCallback func);
88 enum { magicSentinel = 0xdeadbeef };
97 const char *_typeName;
99 static memId _addCitizen(
Citizen const *c);
100 static memId _nextMemIdAndIncrement(
void);
104 static memId _nextMemId(
void);
105 static table _activeCitizens;
106 static table _persistentCitizens;
107 static bool &_shouldPersistCitizens();
112 static memId _deleteId;
114 static memNewCallback _newCallback;
115 static memCallback _deleteCallback;
116 static memCallback _corruptionCallback;
118 bool _hasBeenCorrupted()
const;
unsigned long memId
Type of the block's ID.
A PersistentCitizenScope object causes all Citizen objects created during its lifetime to be marked a...
Citizen & operator=(Citizen const &)
A base class for image defects.
#define LSST_EXPORT
Make a symbol visible even if visiblity is hidden (e.g.
Citizen is a class that should be among all LSST classes base classes, and handles basic memory manag...