forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathType.cpp
More file actions
62 lines (49 loc) · 999 Bytes
/
Type.cpp
File metadata and controls
62 lines (49 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// Type.h
//
// Library: Redis
// Package: Redis
// Module: Type
//
// Implementation of the Type class.
//
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Redis/Type.h"
#include "Poco/Redis/Error.h"
#include "Poco/Redis/Array.h"
namespace Poco {
namespace Redis {
RedisType::RedisType()
{
}
RedisType::~RedisType()
{
}
RedisType::Ptr RedisType::createRedisType(char marker)
{
RedisType::Ptr result;
switch(marker)
{
case RedisTypeTraits<Int64>::marker :
result = new Type<Int64>();
break;
case RedisTypeTraits<std::string>::marker :
result = new Type<std::string>();
break;
case RedisTypeTraits<BulkString>::marker :
result = new Type<BulkString>();
break;
case RedisTypeTraits<Array>::marker :
result = new Type<Array>();
break;
case RedisTypeTraits<Error>::marker :
result = new Type<Error>();
break;
}
return result;
}
} } // namespace Poco::Redis