File: TLStreamStream.m

package info (click to toggle)
tom 1.1.1-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,340 kB
  • ctags: 2,244
  • sloc: objc: 27,863; ansic: 9,804; sh: 7,411; yacc: 3,377; lex: 966; asm: 208; makefile: 62; cpp: 10
file content (71 lines) | stat: -rw-r--r-- 1,442 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* Implementation of TLStreamStream class.
   This file is part of TL, Tiggr's Library.
   Written by Tiggr <tiggr@es.ele.tue.nl>
   Copyright (C) 1995, 1996 Pieter J. Schoenmakers
   TL is distributed WITHOUT ANY WARRANTY.
   See the file LICENSE in the TL distribution for details.

   $Id: TLStreamStream.m,v 1.2 1998/02/23 14:17:40 tiggr Exp $  */

#define TLSTREAMSTREAM_DECLARE_PRIVATE_METHODS
#import "tl/support.h"
#import "tl/TLStreamStream.h"
#import "tl/TLSymbol.h"

@implementation TLStreamStream

+(id) streamWithStream: (id <TLStream>) str
{
  return ([[self gcAlloc] initWithStream: str]);
} /* +streamWithStream: */

-(int) compare: (id) o
{
  return ([stream compare: o]);
} /* -compare: */

-initWithStream: (id) str
{
  ASGN_IVAR (stream, str);
  return (self);
} /* -initWithStream: */

/******************** TLStream ********************/

-close
{
  return ([stream close]);
} /* -close */

-(int) fileDescriptor
{
  return (stream ? [stream fileDescriptor] : -1);
} /* -fileDescriptor */

-streamp
{
  return (Qt);
} /* -streamp */

/******************** TLInputStream ********************/

-flushInput
{
  return ([stream flushInput]);
} /* -flushInput */

/******************** TLOutputStream ********************/

-flushOutput
{
  return ([stream flushOutput]);
} /* -flushOutput */

/******************** garbage collection ********************/

-(void) gcReference
{
  MARK (stream);
} /* -gcReference */

@end