1 /**
2  * Copyright: Copyright (c) 2012 Jacob Carlborg. All rights reserved.
3  * Authors: Jacob Carlborg
4  * Version: Initial created: Aug 6, 2012
5  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6  */
7 module dstep.translator.objc.Category;
8 
9 import clang.Cursor;
10 import clang.Type;
11 
12 import dstep.translator.Declaration;
13 import dstep.translator.objc.ObjcInterface;
14 import dstep.translator.Output;
15 import dstep.translator.Translator;
16 
17 class Category : ObjcInterface!(ClassExtensionData)
18 {
19     this (Cursor cursor, Cursor parent, Translator translator)
20     {
21         super(cursor, parent, translator);
22     }
23 
24     protected override string[] collectInterfaces (ObjcCursor cursor)
25     {
26         auto interfaces = super.collectInterfaces(cursor);
27         auto category = translateIdentifier(cursor.category.spelling);
28 
29         return category ~ interfaces;
30     }
31 }