MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
property.h
Go to the documentation of this file.
1 /*********************************************************************
2  ** Copyright (c) 2012 MaK Technologies, Inc.
3  ** All rights reserved.
4  *********************************************************************/
5 
6 
7 #ifndef property_H_
8 #define property_H_
9 
10 #include <QtCore/QVariant>
11 #include <QtCore/QString>
12 #include <list>
13 
14 #include <rtiMsConfig.h>
15 #include <internalTypes.h>
16 #include "propertyType.h"
17 #include <memory>
18 
19 class DtProperty;
21 typedef DtUniquePtr<DtPropertyType> DtPropertyTypeAP;
22 typedef std::list<DtProperty> DtPropertyList;
23 
26 {
27 public:
28 
29  // Default constructor Construct a property of a name and type.
30  DtProperty(QString name, DtPropertyTypeAP type,QVariant value);
31 
33  DtProperty(const DtProperty&);
34 
35  // Default constructor, used by list, do NOT USE. Internal values are
36  // invalid.
37  DtProperty();
38 
39  // DTOR
40  ~DtProperty();
41 
42  //bool operator== (const DtProperty&);
43  DtProperty& operator= (const DtProperty&);
44  virtual bool operator<(const DtProperty&) const;
45 
46  DtProperty& appendChild(const DtProperty& child);
47  void removeChild(QString name);
48 
50  DtProperty* findChild(QString name);
51  const DtProperty* findChild(QString name) const;
52 
53  // Accessors
54  const DtPropertyType* type() const;
55  QString name() const;
56  QVariant value() const;
57 
58  // This provides a simple means of identifying a property and provides a hook
59  // to associate this property with some other object. Helps alleviate problems
60  // of objects with duplicate names. Id of -1 is defualt--ie it's unassigned.
61  int id() const;
62 
63  // Is read only if myReadOnly is true OR parent is readOnly.
64  // If no parent then use only myReadOnly.
65  bool readOnly() const;
66 
67  DtPropertyList* children();
68  const DtPropertyList* children() const;
69 
70  // Mutators
71  void setId(int id);
72  void setValue(QVariant value);
73  void setReadOnly(bool readOnly);
74 
75 protected:
76  QString myName;
77  QVariant myValue;
79  int myId;
82  bool myReadOnly;
83 };
84 
85 #endif
A property class.
Definition: property.h:25
std::list< DtProperty > DtPropertyList
Definition: property.h:22
int myId
Definition: property.h:79
DtPropertyType is the abstract base class for property types.
Definition: propertyType.h:20
bool myReadOnly
Definition: property.h:82
DtProperty * myParent
Definition: property.h:81
QVariant myValue
Definition: property.h:77
DtPropertyTypeAP myType
Definition: property.h:78
#define DT_DLL_ASSISTANTAPP
Definition: rtiMsConfig.h:151
DtUniquePtr< DtPropertyType > DtPropertyTypeAP
Definition: property.h:20
QString myName
Definition: property.h:76
DtPropertyList * myChildren
Definition: property.h:80
The declaration of internal types.

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)