|
LSSTApplications
16.0-10-g0ee56ad+5,16.0-11-ga33d1f2+5,16.0-12-g3ef5c14+3,16.0-12-g71e5ef5+18,16.0-12-gbdf3636+3,16.0-13-g118c103+3,16.0-13-g8f68b0a+3,16.0-15-gbf5c1cb+4,16.0-16-gfd17674+3,16.0-17-g7c01f5c+3,16.0-18-g0a50484+1,16.0-20-ga20f992+8,16.0-21-g0e05fd4+6,16.0-21-g15e2d33+4,16.0-22-g62d8060+4,16.0-22-g847a80f+4,16.0-25-gf00d9b8+1,16.0-28-g3990c221+4,16.0-3-gf928089+3,16.0-32-g88a4f23+5,16.0-34-gd7987ad+3,16.0-37-gc7333cb+2,16.0-4-g10fc685+2,16.0-4-g18f3627+26,16.0-4-g5f3a788+26,16.0-5-gaf5c3d7+4,16.0-5-gcc1f4bb+1,16.0-6-g3b92700+4,16.0-6-g4412fcd+3,16.0-6-g7235603+4,16.0-69-g2562ce1b+2,16.0-8-g14ebd58+4,16.0-8-g2df868b+1,16.0-8-g4cec79c+6,16.0-8-gadf6c7a+1,16.0-8-gfc7ad86,16.0-82-g59ec2a54a+1,16.0-9-g5400cdc+2,16.0-9-ge6233d7+5,master-g2880f2d8cf+3,v17.0.rc1
LSSTDataManagementBasePackage
|
a generic stream destination for policy data More...
#include <PolicyStringDestination.h>
Public Types | |
| typedef std::shared_ptr< std::ostream > | StreamPtr |
| enum | { magicSentinel = 0xdeadbeef } |
| typedef unsigned long | memId |
| Type of the block's ID. More... | |
| typedef memId(* | memNewCallback) (const memId cid) |
| A function used to register a callback. More... | |
| typedef memId(* | memCallback) (const Citizen *ptr) |
Public Member Functions | |
| PolicyStringDestination () | |
| create the destination More... | |
| PolicyStringDestination (const std::string &str) | |
| create the destination, initialized with the given string More... | |
| virtual | ~PolicyStringDestination () |
| release resource associated with the destination More... | |
| std::string | getData () |
| return the data written so far as a string More... | |
| virtual std::ostream & | getOutputStream () |
| return a stream that can be used to write the data to. More... | |
| std::string | repr () const |
| Return a string representation of a Citizen. More... | |
| void | markPersistent (void) |
| Mark a Citizen as persistent and not destroyed until process end. More... | |
| memId | getId () const |
| Return the Citizen's ID. More... | |
Static Public Member Functions | |
| static bool | hasBeenCorrupted () |
| Check all allocated blocks for corruption. More... | |
| static memId | getNextMemId () |
| Return the memId of the next object to be allocated. More... | |
| static int | init () |
| Called once when the memory system is being initialised. More... | |
Census | |
Provide a list of current Citizens | |
| static int | census (int, memId startingMemId=0) |
| How many active Citizens are there? More... | |
| static void | census (std::ostream &stream, memId startingMemId=0) |
| Print a list of all active Citizens to stream, sorted by ID. More... | |
| static const std::vector< const Citizen * > * | census () |
| Return a (newly allocated) std::vector of active Citizens sorted by ID. More... | |
callbackIDs | |
Set callback Ids. The old Id is returned | |
| static memId | setNewCallbackId (memId id) |
| Call the NewCallback when block is allocated. More... | |
| static memId | setDeleteCallbackId (memId id) |
| Call the current DeleteCallback when block is deleted. More... | |
callbacks | |
Set the New/Delete callback functions; in each case the previously installed callback is returned. These callback functions return a value which is Added to the previously registered id. The default callback functions are called default{New,Delete}Callback; you may want to set a break point in these callbacks from your favourite debugger | |
| static memNewCallback | setNewCallback (memNewCallback func) |
| Set the NewCallback function. More... | |
| static memCallback | setDeleteCallback (memCallback func) |
| Set the DeleteCallback function. More... | |
| static memCallback | setCorruptionCallback (memCallback func) |
| Set the CorruptionCallback function. More... | |
Protected Attributes | |
| StreamPtr | _ostrm |
a generic stream destination for policy data
Definition at line 49 of file PolicyStringDestination.h.
|
inherited |
|
inherited |
Definition at line 52 of file PolicyStreamDestination.h.
| lsst.pex::policy::PolicyStringDestination::PolicyStringDestination | ( | ) |
create the destination
Definition at line 35 of file PolicyStringDestination.cc.
| lsst.pex::policy::PolicyStringDestination::PolicyStringDestination | ( | const std::string & | str | ) |
create the destination, initialized with the given string
| str | initial contents for the output string |
Definition at line 43 of file PolicyStringDestination.cc.
|
virtual |
release resource associated with the destination
Definition at line 51 of file PolicyStringDestination.cc.
|
staticinherited |
How many active Citizens are there?
| startingMemId | Don't print Citizens with lower IDs |
Definition at line 238 of file Citizen.cc.
|
staticinherited |
Print a list of all active Citizens to stream, sorted by ID.
| stream | stream to print to |
| startingMemId | Don't print Citizens with lower IDs |
Definition at line 259 of file Citizen.cc.
|
staticinherited |
Return a (newly allocated) std::vector of active Citizens sorted by ID.
You are responsible for deleting it; or you can say std::unique_ptr<std::vector<Citizen const*> const> leaks(Citizen::census()); and not bother (that becomes std::unique_ptr in C++11)
Definition at line 287 of file Citizen.cc.
|
inline |
return the data written so far as a string
Definition at line 71 of file PolicyStringDestination.h.
|
inherited |
|
staticinherited |
Return the memId of the next object to be allocated.
Definition at line 209 of file Citizen.cc.
|
virtualinherited |
return a stream that can be used to write the data to.
Implements lsst.pex::policy::PolicyDestination.
Definition at line 40 of file PolicyStreamDestination.cc.
|
staticinherited |
Check all allocated blocks for corruption.
Definition at line 316 of file Citizen.cc.
|
staticinherited |
Called once when the memory system is being initialised.
Definition at line 196 of file Citizen.cc.
|
inherited |
Mark a Citizen as persistent and not destroyed until process end.
Definition at line 225 of file Citizen.cc.
|
inherited |
Return a string representation of a Citizen.
Definition at line 219 of file Citizen.cc.
|
staticinherited |
Set the CorruptionCallback function.
| func | function be called when block is found to be corrupted |
Definition at line 391 of file Citizen.cc.
|
staticinherited |
Set the DeleteCallback function.
| func | function be called when desired block is deleted |
Definition at line 381 of file Citizen.cc.
|
staticinherited |
Call the current DeleteCallback when block is deleted.
| id | Desired ID |
Definition at line 347 of file Citizen.cc.
|
staticinherited |
Set the NewCallback function.
| func | The new function to be called when a designated block is allocated |
Definition at line 371 of file Citizen.cc.
|
staticinherited |
Call the NewCallback when block is allocated.
| id | Desired ID |
Definition at line 337 of file Citizen.cc.
|
protectedinherited |
Definition at line 70 of file PolicyStreamDestination.h.
1.8.13