VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwPropertiesFixedArray.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
12 
34 {
35 private:
38 
39 public:
40 
43  DtRwPropertiesFixedArray(const DtString& name, DtReaderWriterRegistry* parentRegistry = 0);
44  DtRwPropertiesFixedArray(const DtString& name, const DtString& keyType,
45  const DtPropertyInterface* prototype, DtReaderWriterRegistry* parentRegistry = 0);
47  DtReaderWriterRegistry* parentRegistry = 0);
48  virtual ~DtRwPropertiesFixedArray();
50 
53  virtual void setFixedSize(unsigned s);
54 
57  virtual void setFixedSize(unsigned s, const DtPropertyInterface* prototype);
58 
62  virtual const char* readerWriterType() const;
63 
65  static const char* theXmlType();
66 
67  virtual const char* xmlType() const
68  {
69  return theXmlType();
70  }
71 
73  virtual char* encode(char*) const;
74 
76  virtual const char* decode(const char*);
77 
79  virtual void getSize(int& size) const;
80 
82  virtual bool isSimilarProperty(const DtPropertyInterface* rhs, bool strict = true) const;
83 
84  bool operator==(const DtRwPropertiesFixedArray&) const;
85 
86 protected:
87 
89  virtual DtPropertyInterface* createPrototype(DtlObjPtr args);
90  virtual DtlObjPtr variablesStart(DtlObjPtr args) const;
91 
92  virtual int hlaAlignment(const DtPropertyInterface* field) const;
93 
99 
100 private:
101 
103  virtual bool addItem(DtPropertyInterface* item) { return false; };
104 
106  virtual DtPropertyInterface* addItem() { return 0; };
107 
109  virtual void erase(DtPropertyInterface* item) {};
110 
112  virtual void erase(iterator pos) {};
113 
114 protected:
115 
117  unsigned myNextPropertyIndex;
118 
119 };
virtual DtPropertyInterface * addItem()
Items cannot be added to a fixed array.
Definition: rwPropertiesFixedArray.h:106
#define DT_DLL_readerWriter
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: readerWriterDefines.h:34
virtual DtlObjPtr variablesStart(DtlObjPtr args) const
voidpf void uLong size
Definition: ioapi.h:39
virtual void erase(DtPropertyInterface *item)
Items cannot be removed from a fixed array.
Definition: rwPropertiesFixedArray.h:109
Definition: readerWriterRegistry.h:39
Interface class used to define minimal interface for a property.
Definition: propertyInterface.h:48
virtual bool isSimilarProperty(const DtPropertyInterface *rhs, bool strict=true) const
Returns true prototype is the same.
Acts as a fixed array for properties.
Definition: rwPropertiesFixedArray.h:33
virtual char * encode(char *) const
Encodes the variable bindings into the supplied buffer.
virtual DtPropertyInterface * createPrototype(DtlObjPtr)
virtual const char * decode(const char *)
Decodes the variable bindings from the specified buffer.
int getSize() const
virtual DtPropertyInterface * clonePrototype(DtReaderWriterRegistry *parent=0)
Returns a clone of the prototype that belongs to this list.
virtual const char * xmlType() const
Definition: rwPropertiesFixedArray.h:67
virtual bool addItem(DtPropertyInterface *item)
Items cannot be added to a fixed array.
Definition: rwPropertiesFixedArray.h:103
bool operator==(const DtRwPropertiesList &) const
virtual void erase(DtPropertyInterface *item)
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is.
Acts as a DtRwList for properties.
Definition: rwPropertiesList.h:38
Definition: rwProperties.h:25
virtual int hlaAlignment() const
The required byte alignment of this property when encoding to HLA.
static const char * theXmlType()
The type that is used when archiving to an XML stream.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)