aboutsummaryrefslogtreecommitdiff
path: root/src/Panda/Attribute.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Panda/Attribute.h')
-rw-r--r--src/Panda/Attribute.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/Panda/Attribute.h b/src/Panda/Attribute.h
new file mode 100644
index 0000000..d948316
--- /dev/null
+++ b/src/Panda/Attribute.h
@@ -0,0 +1,43 @@
+#ifndef Attribute_dot_h
+#define Attribute_dot_h
+
+#include "definitions.h"
+
+
+typedef union int_to_char {
+ int i;
+ char c[4];
+} int_to_char;
+
+//#include "../IEEEIO/IEEEIO.h"
+//#include "../IEEEIO/IOProtos.h"
+#include "external/IEEEIO/src/Arch.h"
+
+class Attribute {
+ char *name_;
+ int esize_;
+ int count_;
+ void *data_;
+ int data_status_; // 0: no alloc, 1: alloc
+
+public:
+ Attribute();
+ Attribute(char *, int);
+ ~Attribute();
+ void init(char *, int, int, void *);
+ void init(char *);
+ void pack(int &, char *&, char *, int);
+ void write(char *, char *, int, int, void *);
+ void read(char *, char *);
+ void write_data(IOFile);
+ void read_data(IOFile);
+ void *get_data_ptr();
+ void set_data_ptr(void *);
+ int data_size();
+ int esize();
+ int count();
+ void set_esize(int);
+ void set_count(int);
+};
+
+#endif