Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GNASH_AS_NAME_H
00018 #define GNASH_AS_NAME_H
00019
00020 #include <vector>
00021
00022 namespace gnash {
00023 class as_object;
00024 class Property;
00025 namespace abc {
00026 class Namespace;
00027 }
00028 }
00029
00030 namespace gnash {
00031 namespace abc {
00032
00034
00040 typedef size_t URI;
00041
00043
00047
00049 class MultiName
00050 {
00051 public:
00052
00053 enum Kind
00054 {
00055 KIND_Qname = 0x07,
00056 KIND_QnameA = 0x0D,
00057 KIND_RTQname = 0x0F,
00058 KIND_RTQnameA = 0x10,
00059 KIND_RTQnameL = 0x11,
00060 KIND_RTQnameLA = 0x12,
00061 KIND_Multiname = 0x09,
00062 KIND_MultinameA = 0x0E,
00063 KIND_MultinameL = 0x1B,
00064 KIND_MultinameLA = 0x1C
00065 };
00066
00067 MultiName()
00068 :
00069 _flags(0),
00070 _namespaceSet(0),
00071 _abcName(0),
00072 _globalName(0),
00073 _namespace(0)
00074 {}
00075
00076 void setFlags(Kind kind) {
00077 _flags = kind;
00078 }
00079
00080 boost::uint8_t flags() const {
00081 return _flags;
00082 }
00083
00085 bool isRuntime() { return _flags & FLAG_RTNAME; }
00086
00088 bool isRtns() { return _flags & FLAG_RTNS; }
00089
00090 bool isQName() { return _flags & FLAG_QNAME; }
00091 void setQName() { _flags |= FLAG_QNAME; }
00092
00093 void setNamespace(Namespace *ns) { _namespace = ns; }
00094 Namespace* getNamespace() const { return _namespace; }
00095
00096 abc::URI getABCName() const { return _abcName; }
00097 void setABCName(abc::URI n) { _abcName = n;}
00098
00099 string_table::key getGlobalName() const { return _globalName;}
00100 void setGlobalName(string_table::key n) { _globalName = n;}
00101
00102 void setAttr() { _flags |= FLAG_ATTR; }
00103
00104 void fill(as_object*) {}
00105
00106 Property* findProperty();
00107
00108 void namespaceSet(std::vector<Namespace*>* v) {
00109 _namespaceSet = v;
00110 }
00111
00112 const std::vector<Namespace*>* namespaceSet() const {
00113 return _namespaceSet;
00114 }
00115
00116 private:
00117
00118 enum Flag
00119 {
00120 FLAG_ATTR = 0x01,
00121 FLAG_QNAME = 0x02,
00122 FLAG_RTNS = 0x04,
00123 FLAG_RTNAME = 0x08,
00124 FLAG_NSSET = 0x10
00125 };
00126
00127 boost::uint8_t _flags;
00128
00129 std::vector<Namespace*>* _namespaceSet;
00130
00131 abc::URI _abcName;
00132
00133 string_table::key _globalName;
00134
00135 Namespace* _namespace;
00136
00137 };
00138
00139 }
00140 }
00141 #endif