Registry for Root converters.
More...
#include <TConverterRegistry.h>
Registry for Root converters.
Definition at line 40 of file TConverterRegistry.h.
◆ CheckSumMap
◆ lock_t
◆ MapType
◆ Payload
◆ SMapType
◆ ~TConverterRegistry()
TConverterRegistry::~TConverterRegistry |
( |
| ) |
|
|
private |
Destructor.
Destroy the registered converters.
Definition at line 157 of file TConverterRegistry.cxx.
161 j !=
i->second.end();
164 if (j->second.second)
165 delete j->second.first;
◆ AddConverter() [1/3]
bool TConverterRegistry::AddConverter |
( |
const char * |
convname | ) |
|
Add a new converter to the registry.
- Parameters
-
convname | The name of the converter class to add. |
- Returns
- True if successful, false if the class couldn't be found.
This will also add a streamer for the class, to support conversion in non-split mode.
Definition at line 81 of file TConverterRegistry.cxx.
83 TClass*
cl = gROOT->GetClass (convname);
84 if (!
cl)
return false;
85 TClass* basecl = gROOT->GetClass (
"TVirtualConverter");
86 int offs =
cl->GetBaseClassOffset (basecl);
87 if (offs < 0)
return false;
88 char* cnv =
reinterpret_cast<char*
> (
cl->New());
◆ AddConverter() [2/3]
Add a new converter to the registry.
- Parameters
-
conv | The converter to add. |
This will also add a streamer for the class, to support conversion in non-split mode.
The caller will retain ownership of the converter.
Definition at line 36 of file TConverterRegistry.cxx.
◆ AddConverter() [3/3]
Add a new converter to the registry.
- Parameters
-
conv | The converter to add. |
takeown | If true, the registry takes ownership of the converter. |
This will also add a streamer for the class, to support conversion in non-split mode.
Definition at line 50 of file TConverterRegistry.cxx.
60 TClass*
cls =
conv->GetTransClass();
69 cmap[
conv->GetCheckSum()] = std::make_pair (
conv, takeown);
◆ AddStreamerConverter()
void TConverterRegistry::AddStreamerConverter |
( |
const std::string & |
from_type, |
|
|
const std::string & |
to_type, |
|
|
TMemberStreamer * |
streamer |
|
) |
| |
◆ GetConverter()
Look up a converter in the registry by name and checksum.
- Parameters
-
name | The name of the (transient) class. |
checksum | The checksum of the persistent class. |
- Returns
- The converter, or 0 if none.
Definition at line 100 of file TConverterRegistry.cxx.
104 MapType::const_iterator
i =
fMap.find (
name);
105 if (
i !=
fMap.end()) {
106 CheckSumMap::const_iterator i2 =
i->second.find (checksum);
107 if (i2 !=
i->second.end())
108 return i2->second.first;
◆ GetStreamerConverter()
TMemberStreamer * TConverterRegistry::GetStreamerConverter |
( |
const std::string & |
from_type, |
|
|
const std::string & |
to_type |
|
) |
| const |
◆ Instance()
◆ fMap
◆ fMutex
std::mutex TConverterRegistry::fMutex |
|
mutableprivate |
◆ fSMap
The documentation for this class was generated from the following files: