ObjFW
OFXMLNode.h
1 /*
2  * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
3  *
4  * All rights reserved.
5  *
6  * This file is part of ObjFW. It may be distributed under the terms of the
7  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8  * the packaging of this file.
9  *
10  * Alternatively, it may be distributed under the terms of the GNU General
11  * Public License, either version 2 or 3, which can be found in the file
12  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13  * file.
14  */
15 
16 #import "OFObject.h"
17 #import "OFSerialization.h"
18 
19 OF_ASSUME_NONNULL_BEGIN
20 
21 @class OFXMLElement;
22 
29 {
30  OF_RESERVE_IVARS(OFXMLNode, 4)
31 }
32 
39 @property (nonatomic, copy) OFString *stringValue;
40 
44 @property (readonly, nonatomic) long long longLongValue;
45 
49 @property (readonly, nonatomic) unsigned long long unsignedLongLongValue;
50 
54 @property (readonly, nonatomic) float floatValue;
55 
59 @property (readonly, nonatomic) double doubleValue;
60 
64 @property (readonly, nonatomic) OFString *XMLString;
65 
66 - (instancetype)init OF_UNAVAILABLE;
67 - (instancetype)initWithSerialization: (OFXMLElement *)element OF_UNAVAILABLE;
68 
77 - (OFString *)XMLStringWithIndentation: (unsigned int)indentation;
78 
88 - (OFString *)XMLStringWithIndentation: (unsigned int)indentation
89  level: (unsigned int)level;
90 
102 - (long long)longLongValueWithBase: (int)base;
103 
115 - (unsigned long long)unsignedLongLongValueWithBase: (int)base;
116 @end
117 
118 OF_ASSUME_NONNULL_END
The root class for all other classes inside ObjFW.
Definition: OFObject.h:520
A class for handling strings.
Definition: OFString.h:132
A class which stores an XML element.
Definition: OFXMLElement.h:34
A class which stores an XML element.
Definition: OFXMLNode.h:30
A protocol for the creation of copies.
Definition: OFObject.h:1187
A protocol for serializing objects.
Definition: OFSerialization.h:29