equal
deleted
inserted
replaced
|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "object.h" |
|
17 #include <cassert> |
|
18 |
|
19 |
|
20 std::auto_ptr<Object> Object_factory::create(objkind_t a_kind, const char* p1, const char* p2) |
|
21 { |
|
22 switch(a_kind) |
|
23 { |
|
24 case ELF: |
|
25 return std::auto_ptr<Object>( new Elf_object(p1, p2) ); |
|
26 break; |
|
27 case COFF: |
|
28 return std::auto_ptr<Object>( new Coff_object(p1, p2) ); |
|
29 break; |
|
30 default: |
|
31 break; |
|
32 } |
|
33 |
|
34 assert(0); |
|
35 |
|
36 // Dead code, just to get rid of the warning. |
|
37 return std::auto_ptr<Object>(0); |
|
38 } |
|
39 |
|
40 Object::~Object() {} |
|
41 |