#include <Sequence.h>
Inheritance diagram for Sequence:


Public Member Functions | |
| Sequence () | |
| Sequence (token_v &) | |
| virtual | ~Sequence () |
| void | SetFile (const std::string &file) |
| std::string | GetFile () |
| void | SetLine (int line) |
| int | GetLine () |
| void | SetPos (int pos) |
| int | GetPos () |
| void | SetExtern (bool x) |
| bool | IsExtern () |
| void | SetParent (Scope *p) |
| Scope * | GetParent () |
| virtual void | Display () |
| void | Tab () |
| std::string | GetExpr () |
| void | xmlsafestr (std::string &) |
| Token * | GetFirstToken () |
| token_v::iterator | Begin () |
| token_v::iterator | End () |
Private Attributes | |
| std::string | m_file |
| int | m_line |
| int | m_pos |
| bool | m_bExtern |
| token_v | m_tokens |
| Scope * | m_parent |
|
|
File ......... Sequence.cpp Published .... 2004-05-17 Author ....... grymse@alhem.net Definition at line 36 of file Sequence.cpp.
|
|
|
Definition at line 46 of file Sequence.cpp. References token_v.
|
|
|
Definition at line 57 of file Sequence.cpp.
|
|
|
Definition at line 55 of file Sequence.h.
00055 { return m_tokens.begin(); }
|
|
|
Reimplemented in Scope, and Statement. Definition at line 69 of file Sequence.cpp. References GetExpr().
00070 {
00071 return;
00072 printf("%s",GetExpr().c_str());
00073 }
|
|
|
Definition at line 56 of file Sequence.h.
00056 { return m_tokens.end(); }
|
|
|
Definition at line 87 of file Sequence.cpp. References COMMENT, config, and xmlsafestr(). Referenced by Statement::Display(), Display(), and Scope::Display().
00088 {
00089 std::string tmp;
00090 bool first = true;
00091 for (token_v::iterator it = m_tokens.begin(); it != m_tokens.end(); it++)
00092 {
00093 Token *t = *it;
00094 if (t -> GetCode() != COMMENT || first)
00095 {
00096 std::string str = t -> GetVal();
00097 // if (tmp.size() && (isalpha(str[0]) || str[0] == '<' || str[0] == '_' || str[0] == 34 || str[0] == '~') )
00098 // tmp += " ";
00099 tmp += str;
00100 }
00101 first = false;
00102 }
00103 if (config["-xml"] == "true")
00104 xmlsafestr(tmp);
00105 return tmp;
00106 }
|
|
|
Definition at line 38 of file Sequence.h. References m_file. Referenced by Statement::Display(), and Scope::Display().
00038 { return m_file; }
|
|
|
Definition at line 139 of file Sequence.cpp. Referenced by Scope::Trail().
|
|
|
Definition at line 40 of file Sequence.h. Referenced by Statement::Display(), and Scope::Display().
00040 { return m_line; }
|
|
|
Definition at line 47 of file Sequence.h. References m_parent. Referenced by Scope::Display(), and Tab().
00047 { return m_parent; }
|
|
|
Definition at line 42 of file Sequence.h.
00042 { return m_pos; }
|
|
|
Definition at line 44 of file Sequence.h. References m_bExtern. Referenced by Statement::Display(), and Scope::Display().
00044 { return m_bExtern; }
|
|
|
Definition at line 43 of file Sequence.h. References m_bExtern.
00043 { m_bExtern = x; }
|
|
|
Definition at line 37 of file Sequence.h. References m_file.
00037 { m_file = file; }
|
|
|
Definition at line 39 of file Sequence.h.
00039 { m_line = line; }
|
|
|
Definition at line 46 of file Sequence.h. References m_parent.
00046 { m_parent = p; }
|
|
|
Definition at line 41 of file Sequence.h.
00041 { m_pos = pos; }
|
|
|
Definition at line 76 of file Sequence.cpp. References GetParent(). Referenced by Statement::Display(), and Scope::Display().
|
|
|
Definition at line 109 of file Sequence.cpp. Referenced by GetExpr(), and Scope::GetTrail().
00110 {
00111 std::string str;
00112 for (size_t i = 0; i < s.size(); i++)
00113 {
00114 switch (s[i])
00115 {
00116 case '&':
00117 str += "&";
00118 break;
00119 case '<':
00120 str += "<";
00121 break;
00122 case '>':
00123 str += ">";
00124 break;
00125 case '"':
00126 str += """;
00127 break;
00128 case '\'':
00129 str += "'";
00130 break;
00131 default:
00132 str += s[i];
00133 }
00134 }
00135 s = str;
00136 }
|
|
|
Definition at line 62 of file Sequence.h. Referenced by IsExtern(), and SetExtern(). |
|
|
Definition at line 59 of file Sequence.h. |
|
|
Definition at line 60 of file Sequence.h. |
|
|
Definition at line 64 of file Sequence.h. Referenced by GetParent(), and SetParent(). |
|
|
Definition at line 61 of file Sequence.h. |
|
|
Definition at line 63 of file Sequence.h. |
1.3.6