~ubuntu-branches/ubuntu/saucy/sope/saucy

« back to all changes in this revision

Viewing changes to sope-gdl1/GDLAccess/EOModel.h

  • Committer: Package Import Robot
  • Author(s): Jeroen Dekkers
  • Date: 2012-05-09 15:39:17 UTC
  • Revision ID: package-import@ubuntu.com-20120509153917-nr4jlm8mktma1yv3
Tags: upstream-1.3.14
ImportĀ upstreamĀ versionĀ 1.3.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
   EOModel.h
 
3
 
 
4
   Copyright (C) 1996 Free Software Foundation, Inc.
 
5
 
 
6
   Author: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
 
7
   Date: August 1996
 
8
 
 
9
   This file is part of the GNUstep Database Library.
 
10
 
 
11
   This library is free software; you can redistribute it and/or
 
12
   modify it under the terms of the GNU Library General Public
 
13
   License as published by the Free Software Foundation; either
 
14
   version 2 of the License, or (at your option) any later version.
 
15
 
 
16
   This library is distributed in the hope that it will be useful,
 
17
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
19
   Library General Public License for more details.
 
20
 
 
21
   You should have received a copy of the GNU Library General Public
 
22
   License along with this library; see the file COPYING.LIB.
 
23
   If not, write to the Free Software Foundation,
 
24
   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
25
*/
 
26
 
 
27
#ifndef __EOModel_h__
 
28
#define __EOModel_h__
 
29
 
 
30
#import <Foundation/NSString.h>
 
31
 
 
32
@class EOEntity;
 
33
 
 
34
@interface EOModel : NSObject
 
35
{
 
36
    NSString     *name;
 
37
    NSString     *path;
 
38
    NSString     *adaptorName;
 
39
    NSString     *adaptorClassName;
 
40
    NSDictionary *connectionDictionary;
 
41
    NSDictionary *pkeyGeneratorDictionary;
 
42
    NSDictionary *userDictionary;
 
43
 
 
44
    NSArray             *entities;             // values with EOEntities
 
45
    NSMutableDictionary *entitiesByName;      // name/value with EOEntity
 
46
    NSMutableDictionary *entitiesByClassName; // class name/value with EOEntity
 
47
 
 
48
    struct {
 
49
        BOOL createsMutableObjects:1;
 
50
        BOOL errors:1;
 
51
    } flags;
 
52
}
 
53
 
 
54
/* Searching for a model file */
 
55
+ (NSString*)findPathForModelNamed:(NSString*)name;
 
56
 
 
57
/* Initializing instances */
 
58
- (id)initWithContentsOfFile:(NSString*)filename;
 
59
- (id)initWithPropertyList:propertyList;
 
60
- (id)initWithName:(NSString*)name;
 
61
 
 
62
/* Getting the filename */
 
63
- (NSString*)path;
 
64
 
 
65
/* Getting a property list representation */
 
66
- (id)modelAsPropertyList;
 
67
 
 
68
/* Getting the name */
 
69
- (NSString*)name;
 
70
 
 
71
/* Using entities */
 
72
- (BOOL)addEntity:(EOEntity *)entity;
 
73
- (void)removeEntityNamed:(NSString *)name;
 
74
- (EOEntity *)entityNamed:(NSString *)name;
 
75
- (NSArray *)entities;
 
76
 
 
77
/* Checking references */
 
78
- (NSArray *)referencesToProperty:(id)property; 
 
79
 
 
80
/* Getting an object's entity */
 
81
- (EOEntity *)entityForObject:(id)object;
 
82
 
 
83
/* Adding model information */
 
84
- (BOOL)incorporateModel:(EOModel *)model;
 
85
 
 
86
/* Accessing the adaptor bundle */
 
87
- (void)setAdaptorName:(NSString *)adaptorName;
 
88
- (NSString *)adaptorName;
 
89
 
 
90
/* Setting and getting the adaptor class name. */
 
91
- (void)setAdaptorClassName:(NSString *)adaptorClassName;
 
92
- (NSString *)adaptorClassName;
 
93
 
 
94
/* Accessing the connection dictionary */
 
95
- (void)setConnectionDictionary:(NSDictionary *)connectionDictionary;
 
96
- (NSDictionary *)connectionDictionary;
 
97
 
 
98
/* Accessing the pkey generator dictionary */
 
99
- (void)setPkeyGeneratorDictionary:(NSDictionary *)connectionDictionary;
 
100
- (NSDictionary *)pkeyGeneratorDictionary;
 
101
 
 
102
/* Accessing the user dictionary */
 
103
- (void)setUserDictionary:(NSDictionary *)dictionary;
 
104
- (NSDictionary *)userDictionary;
 
105
 
 
106
@end
 
107
 
 
108
 
 
109
@interface EOModel (EOModelPrivate)
 
110
 
 
111
- (void)setCreateMutableObjects:(BOOL)flag;
 
112
- (BOOL)createsMutableObjects;
 
113
 
 
114
- (void)errorInReading;
 
115
 
 
116
@end /* EOModel (EOModelPrivate) */
 
117
 
 
118
@interface EOModel(NewInEOF2)
 
119
 
 
120
- (void)loadAllModelObjects;
 
121
 
 
122
@end
 
123
 
 
124
#endif /* __EOModel_h__ */