2 Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
4 Governed by the TrueCrypt License 3.0 the full text of which is contained in
5 the file License.txt included in TrueCrypt binary and source code distribution
10 #include "SerializerFactory.h"
14 void SerializerFactory::Deinitialize ()
23 string SerializerFactory::GetName (const type_info &typeInfo)
25 string typeName = StringConverter::GetTypeName (typeInfo);
26 if (TypeToNameMap->find (typeName) == TypeToNameMap->end())
27 throw std::runtime_error (SRC_POS);
29 return (*TypeToNameMap)[typeName];
32 Serializable *SerializerFactory::GetNewSerializable (const string &typeName)
34 if (NameToTypeMap->find (typeName) == NameToTypeMap->end())
35 throw std::runtime_error (SRC_POS);
37 return (*NameToTypeMap)[typeName].GetNewPtr();
40 void SerializerFactory::Initialize ()
44 NameToTypeMap = new map <string, SerializerFactory::MapEntry>;
45 TypeToNameMap = new map <string, string>;
51 map <string, SerializerFactory::MapEntry> *SerializerFactory::NameToTypeMap;
52 map <string, string> *SerializerFactory::TypeToNameMap;
53 int SerializerFactory::UseCount;
This page took
0.026329 seconds and
3 git commands to generate. Download a nemesis OSX (sierra+high sierra, tested/working) binary, with fuse-ext3 via e2fsprogs, at
this link. application and installer are signed by screwjack, llc. must install fuse with macFUSE layer first.