]> err.no Git - sope/blob - sope-xml/SaxObjC/SaxObjectDecoder.h
removed NGCString
[sope] / sope-xml / SaxObjC / SaxObjectDecoder.h
1 /*
2   Copyright (C) 2000-2004 SKYRIX Software AG
3
4   This file is part of OpenGroupware.org.
5
6   OGo is free software; you can redistribute it and/or modify it under
7   the terms of the GNU Lesser General Public License as published by the
8   Free Software Foundation; either version 2, or (at your option) any
9   later version.
10
11   OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12   WARRANTY; without even the implied warranty of MERCHANTABILITY or
13   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
14   License for more details.
15
16   You should have received a copy of the GNU Lesser General Public
17   License along with OGo; see the file COPYING.  If not, write to the
18   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19   02111-1307, USA.
20 */
21 // $Id$
22
23 #ifndef __SaxObjC_SaxObjectDecoder_H__
24 #define __SaxObjC_SaxObjectDecoder_H__
25
26 #include <SaxObjC/SaxDefaultHandler.h>
27
28 /*
29   This SAX handler takes a model dictionary and maps the SAX events
30   to object construction commands.
31   
32   [to be done: further description of format and function]
33 */
34
35 @class SaxObjectModel;
36
37 @interface SaxObjectDecoder : SaxDefaultHandler
38 {
39   id<NSObject,SaxLocator> locator;
40   id rootObject;
41   id mapping;
42
43   NSMutableArray *infoStack;
44   NSMutableArray *mappingStack;
45   NSMutableArray *objectStack;
46 }
47
48 - (id)initWithMappingModel:(SaxObjectModel *)_model;
49 - (id)initWithMappingAtPath:(NSString *)_path;
50 - (id)initWithMappingNamed:(NSString *)_name;
51
52 /* parse results */
53
54 - (id)rootObject;
55
56 /* cleanup */
57
58 - (void)reset;
59
60 @end
61
62 @interface NSObject(SaxObjectCoding)
63
64 - (id)initWithSaxDecoder:(SaxObjectDecoder *)_decoder;
65 - (id)awakeAfterUsingSaxDecoder:(SaxObjectDecoder *)_decoder;
66
67 @end
68
69 #endif /* __SaxObjC_SaxObjectDecoder_H__ */