Samond Classes Library 1.2.6-STABLE build 219
SCData.h
Go to the documentation of this file.
1 //
2 // SCData.h
3 // scl
4 //
5 // Created by Viacheslav Smolensky on 26.05.17.
6 // Copyright (c) 2007 - 2018 by Samond Development Corporation. All rights reserved.
7 //
8 
22 #import <Foundation/Foundation.h>
23 #import <scl/SCDating.h>
24 #import <scl/SCService.h>
25 #import <scl/SCTypes.h>
26 
27 #pragma mark -
28 #pragma mark Class Constants
29 
38 #define SCDataClass @"SCData"
39 
59 @interface SCData : SCService {
60  NSMutableData *_data; // Pointer to data object
61  SCSize _offset; // Reading operation offset
62 }
63 
64 #pragma mark -
65 #pragma mark Creating Class Instances
66 + (instancetype)dataWithData:(NSData *)data;
67 
68 #pragma mark -
69 #pragma mark Initializing Class Instances
70 - (instancetype)initWithData:(NSData *)data;
71 
72 #pragma mark -
73 #pragma mark Getting Data
74 - (void)getBytes:(void *)buffer length:(NSUInteger)length;
75 - (SCByte)getByte;
76 - (SCUByte)getUByte;
77 - (SCShort)getShort;
78 - (SCUShort)getUShort;
79 - (SCInteger)getInteger;
80 - (SCUInteger)getUInteger;
81 - (SCLong)getLong;
82 - (SCULong)getULong;
83 - (char)getChar;
84 - (unichar)getUnichar;
85 - (const char *)getCharString;
86 - (BOOL)getBool;
87 - (SCFloat)getFloat;
88 - (SCDouble)getDouble;
89 - (NSInteger)getNSInteger;
90 - (NSUInteger)getNSUInteger;
91 - (NSData *)getDataWithLength:(SCSize)length;
92 - (NSData *)getData;
93 - (id)getObject;
94 - (BOOL)eod;
95 
96 #pragma mark -
97 #pragma mark Appending Data
98 - (void)appendByte:(SCByte)value;
99 - (void)appendUByte:(SCUByte)value;
100 - (void)appendShort:(SCShort)value;
101 - (void)appendUShort:(SCUShort)value;
102 - (void)appendInteger:(SCInteger)value;
103 - (void)appendUInteger:(SCUInteger)value;
104 - (void)appendLong:(SCLong)value;
105 - (void)appendULong:(SCULong)value;
106 - (void)appendChar:(char)value;
107 - (void)appendUnichar:(unichar)value;
108 - (void)appendCharString:(const char *)string;
109 - (void)appendBool:(BOOL)value;
110 - (void)appendFloat:(SCFloat)value;
111 - (void)appendDouble:(SCDouble)value;
112 - (void)appendNSInteger:(NSInteger)value;
113 - (void)appendNSUInteger:(NSUInteger)value;
114 - (void)appendData:(NSData *)data;
115 - (void)appendObject:(id<SCDating>)object;
116 
117 @end
uint64_t SCULong
Definition: SCTypes.h:94
int16_t SCShort
Definition: SCTypes.h:189
int64_t SCLong
Definition: SCTypes.h:176
Wrapper class for data objects.
Definition: SCData.h:59
int32_t SCInteger
Definition: SCTypes.h:149
uint32_t SCUInteger
Definition: SCTypes.h:73
Protocol SCDating header file.
int8_t SCByte
Definition: SCTypes.h:119
uint16_t SCUShort
Definition: SCTypes.h:101
uint8_t SCUByte
Definition: SCTypes.h:207
Class SCService header file.
Library types header file.
double SCDouble
Definition: SCTypes.h:131
Data objects communications protocol.
Definition: SCDating.h:45
Parent class of all library service classes.
Definition: SCService.h:52
float SCFloat
Definition: SCTypes.h:143
size_t SCSize
Definition: SCTypes.h:220