]> err.no Git - sope/blob - sope-gdl1/FrontBase2/FBBlobHandle.m
added missing inline pathes
[sope] / sope-gdl1 / FrontBase2 / FBBlobHandle.m
1 // $Id: FBBlobHandle.m 1 2004-08-20 10:38:46Z znek $
2
3 #include "FBBlobHandle.h"
4 #include "FBValues.h"
5 #include "common.h"
6
7 @implementation FBBlobHandle
8
9 - (id)initWithBlobID:(NSString *)_bid {
10   self->bid = [_bid copyWithZone:[self zone]];
11   return self;
12 }
13
14 - (void)dealloc {
15   RELEASE(self->bid);
16   [super dealloc];
17 }
18
19 /* accessors */
20
21 - (NSString *)blobID {
22   return self->bid;
23 }
24
25 /* data */
26
27 + (id)valueFromBytes:(const char *)_bytes length:(unsigned)_length
28   frontBaseType:(int)_fb attribute:(EOAttribute *)_attribute
29   adaptorChannel:(FrontBaseChannel *)_channel
30 {
31   NSLog(@"called %@ on BLOB handle %@", NSStringFromSelector(_cmd), self);
32   return nil;
33 }
34
35 - (NSData *)dataValueForFrontBaseType:(int)_type
36   attribute:(EOAttribute *)_attribute
37 {
38   NSLog(@"called %@ on BLOB handle %@", NSStringFromSelector(_cmd), self);
39   return nil;
40 }
41
42 - (NSString *)stringValueForFrontBaseType:(int)_type
43   attribute:(EOAttribute *)_attribute
44 {
45   switch (_type) {
46     case FB_Character:
47     case FB_VCharacter:
48     case FB_CLOB:
49     case FB_BLOB:
50       return self->bid;
51       //return [NSString stringWithFormat:@"@'%s'", [self->bid cString]];
52   }
53   return nil;
54 }
55
56 - (NSString *)description {
57   return [NSString stringWithFormat:@"<%@[0x%08X]: id=%@>",
58                      NSStringFromClass([self class]), self,
59                      [self blobID]];
60 }
61
62 @end /* FBBlobHandle */