~ubuntu-branches/ubuntu/trusty/openjade1.3/trusty

« back to all changes in this revision

Viewing changes to include/InternalInputSource.h

  • Committer: Bazaar Package Importer
  • Author(s): Yann Dirson
  • Date: 2002-04-09 00:01:50 UTC
  • Revision ID: james.westby@ubuntu.com-20020409000150-r9rkyalxlhvf9ba3
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) 1994 James Clark
 
2
// See the file COPYING for copying permission.
 
3
 
 
4
#ifndef InternalInputSource_INCLUDED
 
5
#define InternalInputSource_INCLUDED 1
 
6
#ifdef __GNUG__
 
7
#pragma interface
 
8
#endif
 
9
 
 
10
#include <stddef.h>
 
11
#include "InputSource.h"
 
12
#include "Allocator.h"
 
13
#include "StringC.h"
 
14
#include "types.h"
 
15
 
 
16
#ifdef SP_NAMESPACE
 
17
namespace SP_NAMESPACE {
 
18
#endif
 
19
 
 
20
class InputSourceOrigin;
 
21
class Messenger;
 
22
class NamedCharRef;
 
23
 
 
24
class SP_API InternalInputSource : public InputSource {
 
25
public:
 
26
  void *operator new(size_t sz, Allocator &alloc) { return alloc.alloc(sz); }
 
27
  void *operator new(size_t sz) { return Allocator::allocSimple(sz); }
 
28
  void operator delete(void *p) { Allocator::free(p); }
 
29
#ifdef SP_HAVE_PLACEMENT_OPERATOR_DELETE
 
30
  void operator delete(void *p, Allocator &) { Allocator::free(p); }
 
31
#endif
 
32
  InternalInputSource(const StringC &, InputSourceOrigin *);
 
33
  Xchar fill(Messenger &);
 
34
  void pushCharRef(Char ch, const NamedCharRef &);
 
35
  Boolean rewind(Messenger &);
 
36
  ~InternalInputSource();
 
37
private:
 
38
  InternalInputSource(const InternalInputSource &); // undefined
 
39
  void operator=(const InternalInputSource &);      // undefined
 
40
  Char *buf_;
 
41
  const StringC *contents_;
 
42
};
 
43
 
 
44
#ifdef SP_NAMESPACE
 
45
}
 
46
#endif
 
47
 
 
48
#endif /* not InternalInputSource_INCLUDED */