3065 some functions in the tcp module can be static
[unleashed.git] / usr / src / cmd / man / src / util / nsgmls.src / include / SdText.h
blob5dbb4383655cf3bb58710f2941d270100ea8d140
1 // Copyright (c) 1995 James Clark
2 // See the file COPYING for copying permission.
3 #pragma ident "%Z%%M% %I% %E% SMI"
5 #ifndef SdText_INCLUDED
6 #define SdText_INCLUDED 1
8 #ifdef __GNUG__
9 #pragma interface
10 #endif
12 #include "types.h"
13 #include "StringOf.h"
14 #include "Vector.h"
15 #include "Location.h"
16 #include <stddef.h>
18 #ifdef SP_NAMESPACE
19 namespace SP_NAMESPACE {
20 #endif
22 struct SP_API SdTextItem {
23 SdTextItem();
24 Location loc;
25 size_t index;
28 class SP_API SdText {
29 public:
30 SdText();
31 SdText(const Location &loc, Boolean lita);
32 void swap(SdText &);
33 void addChar(SyntaxChar, const Location &);
34 const String<SyntaxChar> &string() const;
35 Boolean lita() const;
36 Location endDelimLocation() const;
37 private:
38 Boolean lita_;
39 String<SyntaxChar> chars_;
40 Vector<SdTextItem> items_;
41 friend class SdTextIter;
44 class SP_API SdTextIter {
45 public:
46 SdTextIter(const SdText &);
47 Boolean next(const SyntaxChar *&, size_t &, Location &);
48 private:
49 const SdText *ptr_;
50 size_t itemIndex_;
53 inline
54 Boolean SdText::lita() const
56 return lita_;
59 inline
60 const String<SyntaxChar> &SdText::string() const
62 return chars_;
65 #ifdef SP_NAMESPACE
67 #endif
69 #endif /* not SdText_INCLUDED */