NCL Composer  0.1.5
 All Classes Functions Variables Pages
AttributeReferences.h
1 /* Copyright (c) 2011 Telemidia/PUC-Rio.
2  * All rights reserved. This program and the accompanying materials
3  * are made available under the terms of the Eclipse Public License v1.0
4  * which accompanies this distribution, and is available at
5  * http://www.eclipse.org/legal/epl-v10.html
6  *
7  * Contributors:
8  * Telemidia/PUC-Rio - initial API and implementation
9  */
10 #ifndef ATTRIBUTEREFERENCES_H
11 #define ATTRIBUTEREFERENCES_H
12 #include "ComposerCoreControl_global.h"
13 
14 #include <QString>
15 #include <QMap>
16 
17 namespace composer {
18 namespace util {
25 class COMPOSERCORESHARED_EXPORT AttributeReferences {
26 public:
27  enum REFERENCE_SCOPE {
28  ANY_SCOPE = 0,
29  SAME_SCOPE,
30  USERDEFINED_SCOPE
31  };
32 
33 private:
34  QString element, attr,
35  ref_element, ref_attr;
37  REFERENCE_SCOPE scope;
38  QString userDefinedScope;
39  QMap <QString, REFERENCE_SCOPE> stringToScope;
40 
41 public:
52  AttributeReferences( QString element,
53  QString attr,
54  QString ref_element,
55  QString ref_attr,
56  REFERENCE_SCOPE scope = ANY_SCOPE);
67  AttributeReferences( QString element,
68  QString attr,
69  QString ref_element,
70  QString ref_attr,
71  QString scope);
77  QString getElement();
83  QString getAttribute();
89  QString getRefElement();
95  QString getRefAttribute();
101  void setScope(QString scope);
107  REFERENCE_SCOPE getScope();
113  QString getUserDefinedScope();
114 
115 private:
116  void initializeStringToScope();
117 };
118 
119 }} //end namespace
120 #endif