OLD | NEW |
(Empty) | |
| 1 // NOT FOR LAND |
| 2 #include "config.h" |
| 3 #include "SomeDictionaryUser.h" |
| 4 |
| 5 namespace WebCore { |
| 6 |
| 7 SomeDictionaryUser::SomeDictionaryUser() |
| 8 : m_a(0) |
| 9 , m_b(2) |
| 10 { |
| 11 ScriptWrappable::init(this); |
| 12 } |
| 13 |
| 14 SomeDictionaryUser::~SomeDictionaryUser() |
| 15 { |
| 16 } |
| 17 |
| 18 void SomeDictionaryUser::set(const SomeDictionary* someDictionary) |
| 19 { |
| 20 if (someDictionary->hasA()) |
| 21 m_a = someDictionary->a(); |
| 22 m_b = someDictionary->b(); |
| 23 m_stringMember = someDictionary->stringMember(); |
| 24 m_element = someDictionary->element(); |
| 25 if (someDictionary->hasNullableBooleanMember()) |
| 26 m_nullableBooleanMember = someDictionary->nullableBooleanMember(); |
| 27 m_stringSequenceMember = someDictionary->stringSequenceMember(); |
| 28 m_elementArrayMember = someDictionary->elementArrayMember(); |
| 29 } |
| 30 |
| 31 SomeDictionary* SomeDictionaryUser::get() |
| 32 { |
| 33 SomeDictionary* result = SomeDictionary::create(); |
| 34 if (m_a) |
| 35 result->setA(m_a.get()); |
| 36 result->setB(m_b); |
| 37 result->setStringMember(m_stringMember); |
| 38 result->setElement(m_element); |
| 39 if (m_nullableBooleanMember) |
| 40 result->setNullableBooleanMember(m_nullableBooleanMember); |
| 41 result->setStringSequenceMember(m_stringSequenceMember); |
| 42 result->setElementArrayMember(m_elementArrayMember); |
| 43 return result; |
| 44 } |
| 45 |
| 46 } |
OLD | NEW |