Download for Windows Premium
-65% Premium
Publiciteit
Variant-Typ
Variant type
Bei der Instantiierung Ihres Objekts registriert sich dieser automatisch mit dem Variant-Verwaltungssystem, sodass der neue Variant-Typ aktiviert wird.
When you instantiate your object, it automatically registers itself with the variant-handling system so that the new Variant type is enabled.
Beachten Sie beispielsweise die Unit VarConv, die einen benutzerdefinierten Variant-Typ für Maßangaben implementiert.
For an example, see the FMTBcd unit, which implements a custom Variant type for binary-coded decimal.
Ihr neuer Variant-Typ kann zwar direkt mit einem TVarData-Record arbeiten, jedoch ist es normalerweise einfacher, einen Record-Typ zu definieren, dessen Elemente aussagekräftige Namen bezüglich Ihres neuen Typs besitzen, und diesen neuen Typ dann in einen TVarData-Record umzuwandeln.
While your new Variant type can work directly with a TVarData record, it is usually easier to define a record type whose members have names that are meaningful for your new type, and cast that new type onto the TVarData record type.
Die Unit VarConv definiert z.B. einen selbstdefinierten Variant-Typ, der einen Messwert darstellt.
For example, the VarConv unit defines a custom variant type that represents a measurement.
Delphi besitzt einen variablen Record-Typ TVarData, der das gleiche Speicherlayout wie ein Variant-Typ besitzt.
Delphi includes a variant record type, TVarData, which has the same memory layout as the Variant type.
Beim Instantiieren des Objekts wird es automatisch für das Variant-Verarbeitungssystem registriert, damit der neue Variant-Typ genutzt werden kann.
When you instantiate your object, it automatically registers itself with the Variant-handling system so that the new Variant type is enabled.
Tipp: Sofern Ihr selbstdefinierter Variant-Typ keinen Speicher für seine Daten reserviert, weil die Daten in den TVarData-Record passen, kann Ihre Implementierung der Copy-Methode einfach die Methode SimplisticCopy aufrufen.
Tip: If your custom variant type does not allocate any memory to hold its data (if the data fits entirely in the TVarData record), your implementation of the Copy method can simply call the SimplisticCopy method.
Hinweis: Verwechseln Sie nicht den TVarRec-Record mit dem TVarData-Record, der durch den Variant-Typ selbst verwendet wird.
Note: Do not confuse the TVarRec record with the TVarData record used by the Variant type itself.
Sollte Ihr neuer selbstdefinierter Variant-Typ mehr als 14 Byte zur Speicherung seiner Daten benötigen, müssen Sie einen neuen Record-Typ definieren, der einen Zeiger oder eine Objektinstanz enthält.
If your new custom Variant type needs more than 14 bytes to store its data, you can define a new record type that includes a pointer or object instance.
Das erste Wort bezeichnet den Variant-Typ, die restlichen 14 Bytes stehen zur Speicherung von Daten zur Verfügung.
The first word indicates the type of the variant, and the remaining 14 bytes are available to store the data.
Mit diesen Schritten erweitern Sie den Variant-Typ, sodass die Standardoperatoren mit Ihrem neuen Typ zusammenarbeiten und dieser in andere Typen umgewandelt werden kann.
When you instantiate your object, it automatically registers itself with the Variant-handling system so that the new Variant type is enabled.
Für diesen Zweck gibt es in vielen Programmiersprachen einen Variant-Typ - jedoch nicht in der C++ Standardbibliothek.
That's what Variant types are for. But the C++ Standard Library doesn't have one.
Er zijn geen resultaten gevonden voor deze term.

Synoniemen voor Variant-Typ in het Duits

Publiciteit

Suggesties

Resultaten: 12. Exact: 12. Verstreken tijd: 17 ms.