|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef CONTEXTIDENTIFIER_H |
|
17 #define CONTEXTIDENTIFIER_H |
|
18 |
|
19 #include <vector> |
|
20 |
|
21 #include "identifierbase.h" |
|
22 #include "aliasidentifier.h" |
|
23 |
|
24 namespace Parser |
|
25 { |
|
26 |
|
27 class CContextIdentifier : public CIdentifierBase |
|
28 { |
|
29 public: |
|
30 explicit CContextIdentifier(const char* aName) |
|
31 : CIdentifierBase(Parser::EContextIdentifier, aName), iBaseContext(NULL) |
|
32 { |
|
33 iSize = 0; |
|
34 } |
|
35 |
|
36 void SetBaseContext(const CContextIdentifier* aBaseContext); |
|
37 void AddMember(TMember* aMember); |
|
38 const TMember* FindMember(const std::string& aName); |
|
39 |
|
40 inline const CContextIdentifier* BaseContext() const |
|
41 { |
|
42 return iBaseContext; |
|
43 } |
|
44 |
|
45 virtual void Describe(const unsigned char* aData, unsigned int aLength, const void* aOptions, std::ostream& aDescription) const; |
|
46 virtual int TotalSize() const; |
|
47 |
|
48 public: |
|
49 std::vector<TMember*> iMembers; |
|
50 |
|
51 private: |
|
52 const CContextIdentifier* iBaseContext; |
|
53 }; |
|
54 |
|
55 typedef CAliasIdentifier<CContextIdentifier> CContextAliasIdentifier; |
|
56 |
|
57 } // namespace Parser |
|
58 |
|
59 #endif |
|
60 // CONTEXTIDENTIFIER_H |
|
61 |