• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • kasten
  • controllers
  • view
  • structures
  • parsers
datainformationfactory.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the Okteta Kasten Framework, made within the KDE community.
3  *
4  * Copyright 2012 Alex Richardson <alex.richardson@gmx.de>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) version 3, or any
10  * later version accepted by the membership of KDE e.V. (or its
11  * successor approved by the membership of KDE e.V.), which shall
12  * act as a proxy defined in Section 6 of version 3 of the license.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
21  */
22 #include "datainformationfactory.h"
23 
24 #include "../datatypes/primitive/bitfield/boolbitfielddatainformation.h"
25 #include "../datatypes/primitive/bitfield/unsignedbitfielddatainformation.h"
26 #include "../datatypes/primitive/bitfield/signedbitfielddatainformation.h"
27 #include "../datatypes/primitivefactory.h"
28 
29 #include "../script/scriptlogger.h"
30 #include <QScriptEngine>
31 
32 AbstractBitfieldDataInformation* DataInformationFactory::newBitfield(const BitfieldParsedData& pd)
33 {
34  if (!pd.width.isValid)
35  {
36  if (pd.width.string.isEmpty())
37  pd.error() << "Bitfield is missing width.";
38  else
39  pd.error() << "Width of bitfield is not a valid number: " << pd.width.string;
40  return 0;
41  }
42  if (pd.width.value <= 0 || pd.width.value > 64)
43  {
44  pd.error() << "Width of bitfield is not a value from 1-64:" << pd.width.value;
45  return 0;
46  }
47  AbstractBitfieldDataInformation* bitf = 0;
48  const QString type = pd.type.toLower();
49  if (type.isEmpty())
50  {
51  pd.info() << "No bitfield type specified, defaulting to unsigned.";
52  bitf = new UnsignedBitfieldDataInformation(pd.name, pd.width.value, pd.parent);
53  }
54  else if (type == QLatin1String("bool"))
55  bitf = new BoolBitfieldDataInformation(pd.name, pd.width.value, pd.parent);
56  else if (type == QLatin1String("unsigned"))
57  bitf = new UnsignedBitfieldDataInformation(pd.name, pd.width.value, pd.parent);
58  else if (type == QLatin1String("signed"))
59  bitf = new SignedBitfieldDataInformation(pd.name, pd.width.value, pd.parent);
60  else
61  {
62  pd.error() << "invalid bitfield type attribute given:" << type;
63  return 0;
64  }
65  return bitf;
66 }
67 
68 PrimitiveDataInformation* DataInformationFactory::newPrimitive(const PrimitiveParsedData& pd)
69 {
70  if (pd.type.isEmpty())
71  {
72  pd.error() << "Type of primitive not specified, cannot create it!";
73  return 0;
74  }
75  LoggerWithContext lwc(pd.logger, pd.context());
76  PrimitiveDataType primitiveType = PrimitiveFactory::typeStringToType(pd.type, lwc);
77  if (primitiveType == Type_Invalid || primitiveType == Type_Bitfield)
78  {
79  pd.error() << "Unrecognized primitive type: " << pd.type;
80  return 0;
81  }
82  return PrimitiveFactory::newInstance(pd.name, primitiveType, lwc, pd.parent);
83 }
84 
85 namespace
86 {
87 template<class T>
88 T* newEnumOrFlags(const EnumParsedData& pd)
89 {
90  LoggerWithContext lwc(pd.logger, pd.context() + QLatin1String(" (type)"));
91  const PrimitiveDataType primitiveType = PrimitiveFactory::typeStringToType(pd.type, lwc);
92  if (primitiveType == Type_Invalid || primitiveType == Type_Bitfield)
93  {
94  pd.error() << "Unrecognized enum type: " << pd.type;
95  return 0;
96  }
97  if (primitiveType == Type_Float || primitiveType == Type_Double)
98  {
99  pd.error() << "Floating-point enums are not allowed since they make little sense.";
100  return 0;
101  }
102  EnumDefinition::Ptr definition = pd.enumDef;
103  if (!definition)
104  {
105  QMap<AllPrimitiveTypes, QString> enumValues =
106  EnumDefinition::parseEnumValues(pd.enumValuesObject, lwc, primitiveType);
107  if (enumValues.isEmpty())
108  {
109  pd.error() << "No enum values specified!";
110  return 0;
111  }
112  definition = EnumDefinition::Ptr(new EnumDefinition(enumValues, pd.enumName, primitiveType));
113  }
114  if (definition->type() != primitiveType)
115  {
116  pd.error().nospace() << "Enum type (" << definition->type() << ") and value type (" << primitiveType
117  << ") do not match!";
118  return 0;
119  }
120  PrimitiveDataInformation* primData = PrimitiveFactory::newInstance(pd.name, primitiveType, lwc);
121  //TODO allow bitfields?
122  if (!primData)
123  {
124  pd.error() << "Could not create a value object for this enum!";
125  return 0;
126  }
127  return new T(pd.name, primData, definition, pd.parent);
128 }
129 
130 template<class T>
131 T* newStructOrUnion(const StructOrUnionParsedData& supd)
132 {
133  T* structOrUnion = new T(supd.name, QVector<DataInformation*>(), supd.parent);
134  supd.children->setParent(structOrUnion);
135  while (supd.children->hasNext())
136  {
137  DataInformation* data = supd.children->next();
138  if (data)
139  structOrUnion->appendChild(data, false);
140  else
141  return 0; //error message should be logged already
142  }
143  if (structOrUnion->childCount() == 0)
144  supd.info() << "No children were found, this is probably a mistake.";
145  return structOrUnion;
146 }
147 
148 QString generateLengthFunction(DataInformation* current, DataInformation* last, QString elemName,
149  QString currentString, const ParserInfo& info)
150 {
151  if (!current) //reached top
152  return QString();
153  for (int i = current->childCount() - 1; i >= 0; --i)
154  {
155  DataInformation* child = current->childAt(i);
156  if (child == last)
157  return QString(); //don't go down again after going up one level
158 
159  QString childName = child->name();
160  if (childName == elemName)
161  {
162  QString function = QLatin1String("function() { return this.parent.") + currentString
163  + elemName + QLatin1String(".value; }");
164  info.info() << "Found element for dynamic array length: " << child->fullObjectPath()
165  << ", resulting function is: " << function;
166  return function;
167  }
168  else if (child->childCount() > 0)
169  {
170  QString func = generateLengthFunction(child, current, elemName,
171  currentString + childName + QLatin1Char('.'), info);
172  //if func is empty no valid child was found, just continue
173  if (!func.isEmpty())
174  return func;
175  }
176  //has no children and was not the desired element -> continue loop
177  }
178  //now check parents
179  DataInformationBase* nextBase = current->parent();
180  if (!nextBase)
181  return QString();
182 
183  DataInformation* next = nextBase->asDataInformation();
184  if (next == last)
185  return QString(); //we moved one level down previously, don't move up again
186  else
187  return generateLengthFunction(current->parent()->asDataInformation(), current, elemName,
188  currentString + QLatin1String("parent."), info);
189 }
190 
191 }
192 
193 EnumDataInformation* DataInformationFactory::newEnum(const EnumParsedData& pd)
194 {
195  return newEnumOrFlags<EnumDataInformation>(pd);
196 }
197 
198 FlagDataInformation* DataInformationFactory::newFlags(const EnumParsedData& pd)
199 {
200  return newEnumOrFlags<FlagDataInformation>(pd);
201 }
202 
203 ArrayDataInformation* DataInformationFactory::newArray(const ArrayParsedData& pd)
204 {
205  if (!pd.arrayType)
206  {
207  pd.error() << "Failed to parse array type!";
208  return 0;
209  }
210  if (!pd.length.isValid())
211  {
212  pd.error() << "No array length specified!";
213  return 0;
214  }
215  const ParsedNumber<uint> fixedLength = ParserUtils::uintFromScriptValue(pd.length);
216  if (fixedLength.isValid)
217  {
218  return new ArrayDataInformation(pd.name, fixedLength.value, pd.arrayType, pd.parent, QScriptValue());
219  }
220  else if (pd.length.isFunction())
221  {
222  return new ArrayDataInformation(pd.name, 0, pd.arrayType, pd.parent, pd.length);
223  }
224  else
225  {
226  //neither integer nor function, must be a string containing the name of another element.
227  const QString lengthStr = pd.length.toString();
228  if (!pd.parent)
229  {
230  pd.error() << "Toplevel array has length depending on other field (" << lengthStr
231  << "). This is not possible.";
232  return 0;
233  }
234  if (lengthStr.contains(QLatin1Char('.')))
235  {
236  pd.error() << "Referenced array length element (" << lengthStr << ") contains '.', this is not allowed!";
237  return 0; //TODO maybe add possible shorthand length="this.parent.length"
238  }
239  QString lengthFunctionString = generateLengthFunction(pd.parent, 0, lengthStr, QString(), pd);
240  if (lengthFunctionString.isEmpty()) {
241  pd.error() << "Could not find element " << lengthStr << " referenced as array length!";
242  return 0;
243  }
244  QScriptValue lengthFunction = ParserUtils::functionSafeEval(pd.engine, lengthFunctionString);
245  return new ArrayDataInformation(pd.name, 0, pd.arrayType, pd.parent, lengthFunction);
246  }
247 }
248 
249 StringDataInformation* DataInformationFactory::newString(const StringParsedData& pd)
250 {
251  if (pd.maxByteCount.isValid && pd.maxCharCount.isValid)
252  {
253  pd.error() << "Both maxCharCount and maxByteCount are set, only one is allowed.";
254  return 0;
255  }
256  StringDataInformation::StringType encoding = ParserUtils::toStringEncoding(pd.encoding,
257  LoggerWithContext(pd.logger, pd.context()));
258  if (encoding == StringDataInformation::InvalidEncoding)
259  {
260  pd.error() << "Bad string encoding given:" << pd.encoding;
261  return 0;
262  }
263  StringDataInformation* data = new StringDataInformation(pd.name, encoding, pd.parent);
264  bool modeSet = false;
265  if (pd.termination.isValid)
266  {
267  data->setTerminationCodePoint(pd.termination.value);
268  modeSet = true;
269  }
270  if (pd.maxByteCount.isValid)
271  {
272  data->setMaxByteCount(pd.maxByteCount.value);
273  modeSet = true;
274  }
275  if (pd.maxCharCount.isValid)
276  {
277  data->setMaxCharCount(pd.maxCharCount.value);
278  modeSet = true;
279  }
280  //if mode is None, we assume zero terminated strings
281  if (!modeSet)
282  {
283  pd.info() << "No string termination mode set, assuming null terminated strings.";
284  data->setTerminationCodePoint(0);
285  Q_ASSERT(data->terminationMode() == StringData::Sequence);
286  }
287  return data;
288 }
289 
290 UnionDataInformation* DataInformationFactory::newUnion(const StructOrUnionParsedData& pd)
291 {
292  return newStructOrUnion<UnionDataInformation>(pd);
293 }
294 
295 StructureDataInformation* DataInformationFactory::newStruct(const StructOrUnionParsedData& pd)
296 {
297  return newStructOrUnion<StructureDataInformation>(pd);
298 }
299 
300 bool DataInformationFactory::commonInitialization(DataInformation* data, const CommonParsedData& pd)
301 {
302  data->setByteOrder(pd.endianess);
303 
304  if (data->name().isEmpty())
305  {
306  pd.warn() << "Name is empty!";
307  }
308  if (pd.updateFunc.isValid())
309  {
310  if (!pd.updateFunc.isFunction())
311  {
312  pd.error() << "Update function is not a function: " << pd.updateFunc.toString();
313  return false;
314  }
315  else
316  data->setUpdateFunc(pd.updateFunc);
317  }
318  if (pd.validationFunc.isValid())
319  {
320  if (!pd.validationFunc.isFunction())
321  {
322  pd.error() << "Validation function is not a function: " << pd.validationFunc.toString();
323  return false;
324  }
325  else
326  data->setValidationFunc(pd.validationFunc);
327  }
328  if (pd.toStringFunc.isValid())
329  {
330  if (!pd.toStringFunc.isFunction())
331  {
332  pd.error() << "To string function is not a function: " << pd.toStringFunc.toString();
333  return false;
334  }
335  else
336  data->setToStringFunction(pd.toStringFunc);
337  }
338  if (!pd.customTypeName.isEmpty())
339  {
340  data->setCustomTypeName(pd.customTypeName);
341  }
342  return true;
343 
344 }
345 
346 PointerDataInformation* DataInformationFactory::newPointer(const PointerParsedData& pd)
347 {
348  if (!pd.pointerTarget)
349  {
350  pd.error() << "Missing pointer target";
351  return 0;
352  }
353  if (!pd.valueType)
354  {
355  pd.error() << "Missing pointer type";
356  return 0;
357  }
358  if (!pd.valueType->isPrimitive())
359  {
360  pd.error() << "Bad pointer type, only unsigned integers are allowed";
361  return 0;
362  }
363  PrimitiveDataInformation* primValue = pd.valueType->asPrimitive();
364  if (!(primValue->type() == Type_UInt8 || primValue->type() == Type_UInt16
365  || primValue->type() == Type_UInt32 || primValue->type() == Type_UInt64))
366  {
367  pd.error() << "Bad pointer type, only unsigned integers are allowed"; //TODO offsets (signed int + bitfields)
368  return 0;
369  }
370  return new PointerDataInformation(pd.name, pd.pointerTarget, primValue, pd.parent);
371 }
372 
373 TaggedUnionDataInformation* DataInformationFactory::newTaggedUnion(const TaggedUnionParsedData& pd)
374 {
375  QScopedPointer<TaggedUnionDataInformation> tagged(new TaggedUnionDataInformation(pd.name, pd.parent));
376  pd.children->setParent(tagged.data());
377  while (pd.children->hasNext())
378  {
379  DataInformation* data = pd.children->next();
380  if (data)
381  tagged->appendChild(data, false);
382  else
383  return 0; //error message should be logged already
384  }
385  if (tagged->childCount() == 0)
386  {
387  pd.error() << "No children in tagged union. At least one is required so that tag can be evaluated.";
388  return 0;
389  }
390  //verify alternatives
391  bool alternativesValid = true;
392  QVector<TaggedUnionDataInformation::FieldInfo> altInfo;
393  for(int i = 0; i < pd.alternatives.size(); ++i)
394  {
395  const TaggedUnionParsedData::Alternatives& fi = pd.alternatives.at(i);
396  if (!fi.selectIf.isFunction())
397  {
398  ParsedNumber<quint64> number = ParserUtils::uint64FromScriptValue(fi.selectIf);
399  if (!number.isValid)
400  {
401  pd.error() << "Alternative number" << i << "is not valid. SelectIf is neither function nor number!";
402  alternativesValid = false;
403  }
404  //number is valid -> there must be exactly one field
405  if (tagged->childCount() != 1)
406  {
407  pd.error() << "Alternative number" << i << "is not valid. SelectIf is number,"
408  " but there is not exactly one child!";
409  alternativesValid = false;
410  }
411  }
412  QVector<DataInformation*> children;
413  while (fi.fields->hasNext())
414  {
415  DataInformation* next = fi.fields->next();
416  if (next)
417  children.append(next);
418  else
419  {
420  pd.error() << "Alternative number" << i << "has an invalid field!";
421  alternativesValid = false;
422  }
423  }
424  altInfo.append(TaggedUnionDataInformation::FieldInfo(fi.name, fi.selectIf, children));
425 
426  }
427  if (!alternativesValid)
428  {
429  for (int i = 0; i < altInfo.size(); ++i)
430  qDeleteAll(altInfo.at(i).fields);
431  return 0;
432  }
433  tagged->setAlternatives(altInfo, false);
434 
435  pd.defaultFields->setParent(tagged.data());
436  while (pd.defaultFields->hasNext())
437  {
438  DataInformation* data = pd.defaultFields->next();
439  if (data)
440  tagged->appendDefaultField(data, false);
441  else
442  return 0; //error message should be logged already
443  }
444  return tagged.take();
445 }
ParserInfo::info
QDebug info() const
Definition: parserutils.h:67
DataInformation
Interface that must be implemented by all datatypes.
Definition: datainformation.h:67
DataInformationFactory::commonInitialization
bool commonInitialization(DataInformation *data, const CommonParsedData &pd)
Definition: datainformationfactory.cpp:300
DataInformation::name
QString name() const
Definition: datainformation.h:258
DataInformation::fullObjectPath
QString fullObjectPath() const
Definition: datainformation.cpp:258
LoggerWithContext
Definition: scriptlogger.h:94
DataInformationFactory::newString
StringDataInformation * newString(const StringParsedData &pd)
Definition: datainformationfactory.cpp:249
StringDataInformation::setTerminationCodePoint
void setTerminationCodePoint(uint term)
Definition: stringdatainformation.h:140
datainformationfactory.h
FlagDataInformation
Definition: flagdatainformation.h:29
BitfieldParsedData::type
QString type
Definition: datainformationfactory.h:58
PointerDataInformation
Definition: pointerdatainformation.h:30
DataInformation::childCount
virtual unsigned int childCount() const =0
Definition: datainformation.h:278
DataInformationFactory::newPointer
PointerDataInformation * newPointer(const PointerParsedData &pd)
Definition: datainformationfactory.cpp:346
ParserInfo::engine
QScriptEngine * engine
Definition: parserutils.h:61
TaggedUnionParsedData::Alternatives
Definition: datainformationfactory.h:110
EnumParsedData::enumName
QString enumName
Definition: datainformationfactory.h:74
ParsedNumber::value
T value
Definition: parserutils.h:88
DataInformationFactory::newFlags
FlagDataInformation * newFlags(const EnumParsedData &pd)
Definition: datainformationfactory.cpp:198
ParserUtils::functionSafeEval
QScriptValue functionSafeEval(QScriptEngine *engine, const QString &str)
This essentially calls engine->evaluate(str), but ensures it can be a function (QTBUG-5757) ...
Definition: parserutils.cpp:184
PointerParsedData::pointerTarget
DataInformation * pointerTarget
Definition: datainformationfactory.h:104
ParsedNumber::string
QString string
Definition: parserutils.h:87
StructOrUnionParsedData::children
QScopedPointer< ChildrenParser > children
Definition: datainformationfactory.h:125
ParsedNumber
Holds a number that was converted either from a QScriptValue or a QString.
Definition: parserutils.h:84
PrimitiveParsedData::type
QString type
Definition: datainformationfactory.h:66
EnumDataInformation
Definition: enumdatainformation.h:29
TaggedUnionParsedData::Alternatives::selectIf
QScriptValue selectIf
Definition: datainformationfactory.h:112
SignedBitfieldDataInformation
Definition: signedbitfielddatainformation.h:29
QVector< DataInformation * >
DataInformationFactory::newTaggedUnion
TaggedUnionDataInformation * newTaggedUnion(const TaggedUnionParsedData &pd)
Definition: datainformationfactory.cpp:373
PrimitiveDataInformation::type
virtual PrimitiveDataType type() const =0
StringDataInformation::setMaxCharCount
void setMaxCharCount(uint count)
Definition: stringdatainformation.h:130
Type_UInt32
Definition: primitivedatatype.h:42
CommonParsedData::toStringFunc
QScriptValue toStringFunc
Definition: datainformationfactory.h:49
TaggedUnionParsedData::Alternatives::fields
QSharedPointer< ChildrenParser > fields
Definition: datainformationfactory.h:113
ArrayParsedData::length
QScriptValue length
Definition: datainformationfactory.h:95
TaggedUnionDataInformation
A class holding the data of a struct for Okteta.
Definition: taggeduniondatainformation.h:31
BoolBitfieldDataInformation
Definition: boolbitfielddatainformation.h:30
EnumParsedData
Definition: datainformationfactory.h:71
StringParsedData::encoding
QString encoding
Definition: datainformationfactory.h:84
DataInformation::setValidationFunc
void setValidationFunc(const QScriptValue &func)
Definition: datainformation.h:374
EnumDefinition::Ptr
QSharedDataPointer< EnumDefinition > Ptr
Definition: enumdefinition.h:40
ArrayDataInformation
Definition: arraydatainformation.h:36
PrimitiveDataType
Definition: primitivedatatype.h:54
BitfieldParsedData
Definition: datainformationfactory.h:56
StringParsedData::termination
ParsedNumber< quint32 > termination
Definition: datainformationfactory.h:85
CommonParsedData
Definition: datainformationfactory.h:44
ParserUtils::uintFromScriptValue
ParsedNumber< uint > uintFromScriptValue(const QScriptValue &val)
Definition: parserutils.cpp:103
DataInformation::childAt
virtual DataInformation * childAt(unsigned int) const =0
Definition: datainformation.h:268
Type_UInt16
Definition: primitivedatatype.h:39
Type_UInt64
Definition: primitivedatatype.h:45
DataInformation::setToStringFunction
void setToStringFunction(const QScriptValue &value)
Definition: datainformation.h:379
StringDataInformation::InvalidEncoding
Definition: stringdatainformation.h:44
ParserInfo::logger
ScriptLogger * logger
Definition: parserutils.h:59
DataInformationFactory::newPrimitive
PrimitiveDataInformation * newPrimitive(const PrimitiveParsedData &pd)
Definition: datainformationfactory.cpp:68
ParserUtils::toStringEncoding
StringDataInformation::StringType toStringEncoding(const QString &str, const LoggerWithContext &logger)
Definition: parserutils.cpp:148
Type_Float
Definition: primitivedatatype.h:46
DataInformation::setByteOrder
void setByteOrder(DataInformationEndianess newEndianess)
Definition: datainformation.h:293
ParserInfo::parent
DataInformation * parent
Definition: parserutils.h:60
StringParsedData::maxCharCount
ParsedNumber< quint32 > maxCharCount
Definition: datainformationfactory.h:86
DataInformationFactory::newUnion
UnionDataInformation * newUnion(const StructOrUnionParsedData &pd)
Definition: datainformationfactory.cpp:290
PrimitiveFactory::typeStringToType
PrimitiveDataType typeStringToType(const QString &string, const LoggerWithContext &logger)
Converts typeStr to a PrimitiveDataType case-insensitively.
Definition: primitivefactory.cpp:30
ParserInfo
For use by the parsers so that the functions don't have as many parameters.
Definition: parserutils.h:48
UnsignedBitfieldDataInformation
Definition: unsignedbitfielddatainformation.h:29
StringData::Sequence
Definition: stringdata.h:43
DataInformationFactory::newEnum
EnumDataInformation * newEnum(const EnumParsedData &pd)
Definition: datainformationfactory.cpp:193
ParserInfo::context
QString context() const
Definition: parserutils.h:63
EnumParsedData::type
QString type
Definition: datainformationfactory.h:73
DataInformationBase::asPrimitive
PrimitiveDataInformation * asPrimitive()
UnionDataInformation
A class holding the data of a union for Okteta.
Definition: uniondatainformation.h:28
Type_Bitfield
Definition: primitivedatatype.h:48
StringDataInformation::StringType
StringType
Definition: stringdatainformation.h:43
PrimitiveFactory::newInstance
PrimitiveDataInformation * newInstance(const QString &name, PrimitiveDataType type, const LoggerWithContext &logger, DataInformation *parent)
Definition: primitivefactory.cpp:66
EnumDefinition::parseEnumValues
static QMap< AllPrimitiveTypes, QString > parseEnumValues(const QScriptValue &val, const LoggerWithContext &logger, PrimitiveDataType type=Type_UInt64)
Definition: enumdefinition.cpp:31
DataInformation::setCustomTypeName
void setCustomTypeName(const QString &customTypeName)
Set a custom string to be used for typeName() instead of the default.
Definition: datainformation.cpp:103
PointerParsedData::valueType
DataInformation * valueType
Definition: datainformationfactory.h:103
TaggedUnionDataInformation::FieldInfo
If selector is a function and it evaluates to true these fields are chosen.
Definition: taggeduniondatainformation.h:39
PrimitiveParsedData
Definition: datainformationfactory.h:64
DataInformationBase::asDataInformation
DataInformation * asDataInformation()
Definition: datainformationbase.h:107
EnumDefinition
Definition: enumdefinition.h:37
CommonParsedData::updateFunc
QScriptValue updateFunc
Definition: datainformationfactory.h:47
Type_Invalid
!! DO NOT CHANGE ORDER OF ITEMS !!!
Definition: primitivedatatype.h:31
BitfieldParsedData::width
ParsedNumber< int > width
Definition: datainformationfactory.h:59
TaggedUnionParsedData
Definition: datainformationfactory.h:109
DataInformation::parent
DataInformationBase * parent() const
Definition: datainformation.h:309
CommonParsedData::customTypeName
QString customTypeName
Definition: datainformationfactory.h:50
ParserInfo::error
QDebug error() const
Definition: parserutils.h:69
DataInformationBase
Definition: datainformationbase.h:44
DataInformationFactory::newStruct
StructureDataInformation * newStruct(const StructOrUnionParsedData &pd)
Definition: datainformationfactory.cpp:295
PointerParsedData
Definition: datainformationfactory.h:101
TaggedUnionParsedData::alternatives
QVector< Alternatives > alternatives
Definition: datainformationfactory.h:117
Type_UInt8
Definition: primitivedatatype.h:35
ParserInfo::name
QString name
Definition: parserutils.h:58
DataInformationFactory::newArray
ArrayDataInformation * newArray(const ArrayParsedData &pd)
Definition: datainformationfactory.cpp:203
CommonParsedData::validationFunc
QScriptValue validationFunc
Definition: datainformationfactory.h:48
ParserUtils::uint64FromScriptValue
ParsedNumber< quint64 > uint64FromScriptValue(const QScriptValue &val)
Definition: parserutils.cpp:120
DataInformation::setUpdateFunc
void setUpdateFunc(const QScriptValue &func)
Definition: datainformation.h:369
StructOrUnionParsedData
Definition: datainformationfactory.h:123
StringDataInformation::setMaxByteCount
void setMaxByteCount(uint count)
Definition: stringdatainformation.h:120
EnumParsedData::enumValuesObject
QScriptValue enumValuesObject
only used if enumDef is null, to allow sharing (only possible in OSD)
Definition: datainformationfactory.h:77
Type_Double
Definition: primitivedatatype.h:47
ParsedNumber::isValid
bool isValid
Definition: parserutils.h:89
ArrayParsedData::arrayType
DataInformation * arrayType
Definition: datainformationfactory.h:96
AbstractBitfieldDataInformation
Definition: abstractbitfielddatainformation.h:28
PrimitiveDataInformation
A base class for all primitive data elements (e.g.
Definition: primitivedatainformation.h:34
DataInformationBase::isPrimitive
virtual bool isPrimitive() const
Definition: datainformationbase.cpp:45
ArrayParsedData
Definition: datainformationfactory.h:93
TaggedUnionParsedData::defaultFields
QScopedPointer< ChildrenParser > defaultFields
Definition: datainformationfactory.h:118
StringParsedData::maxByteCount
ParsedNumber< quint32 > maxByteCount
Definition: datainformationfactory.h:87
CommonParsedData::endianess
DataInformation::DataInformationEndianess endianess
Definition: datainformationfactory.h:51
StringParsedData
Definition: datainformationfactory.h:82
StringDataInformation
Definition: stringdatainformation.h:39
StringDataInformation::terminationMode
uint terminationMode() const
Definition: stringdatainformation.h:155
TaggedUnionParsedData::children
QScopedPointer< ChildrenParser > children
Definition: datainformationfactory.h:116
QMap< AllPrimitiveTypes, QString >
EnumParsedData::enumDef
EnumDefinition::Ptr enumDef
Definition: datainformationfactory.h:75
TaggedUnionParsedData::Alternatives::name
QString name
Definition: datainformationfactory.h:111
ParserInfo::warn
QDebug warn() const
Definition: parserutils.h:68
StructureDataInformation
A class holding the data of a struct for Okteta.
Definition: structuredatainformation.h:28
DataInformationFactory::newBitfield
AbstractBitfieldDataInformation * newBitfield(const BitfieldParsedData &pd)
Definition: datainformationfactory.cpp:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal