ObjFW  Check-in [1caf21d1b2]

Overview
Comment:More documentation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1caf21d1b218cb69035d46bb7694b13d7cb8cead8bb406b7558f5b4438bf7763
User & Date: js on 2008-11-05 18:22:03
Other Links: manifest | tags
Context
2008-11-05
20:30
More documentation stuff. check-in: b5e28fc975 user: js tags: trunk
18:22
More documentation. check-in: 1caf21d1b2 user: js tags: trunk
17:51
More documentation. check-in: 32ccf22a44 user: js tags: trunk
Changes

Modified src/OFConstCString.h from [f47fa2a8ee] to [a6c136d668].

1
2
3
4
5
6
7
8
9
10
11
12
13



14
15
16
17
18
19






20




21




22






23







24
25
/*
 * Copyright (c) 2008
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of libobjfw. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import "OFString.h"




@interface OFConstCString: OFString
{
	const char *string;
	size_t	   length;
}







- initAsConstCString: (const char*)str;




- (const char*)cString;




- (size_t)length;






- (OFString*)clone;







- (int)compareTo: (OFString*)str;
@end













>
>
>






>
>
>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>
>
>

>
>
>
>
>
>
>


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 * Copyright (c) 2008
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of libobjfw. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#import "OFString.h"

/**
 * An OFString using a constant C string as internal storage.
 */
@interface OFConstCString: OFString
{
	const char *string;
	size_t	   length;
}

/**
 * Initializes an already allocated OFConstCString.
 * 
 * \param str A constant C string to initialize the OFConstCString with.
 * \returns An initialized OFConstCString
 */
- initAsConstCString: (const char*)str;

/**
 * \return The OFConstCString as a constant C string.
 */
- (const char*)cString;

/**
 * \return The length of the OFConstCString.
 */
- (size_t)length;

/**
 * Clones the OFConstCString, creating a new one.
 * 
 * \return A copy of the OFConstCString
 */
- (OFString*)clone;

/**
 * Compares the OFConstCString to another OFString.
 *
 * \param str An OFString in a compatible type to compare with
 * \return An integer which is the result of the comparison, see strcmp.
 */
- (int)compareTo: (OFString*)str;
@end

Modified src/OFConstWideCString.h from [0e3e3b6f7d] to [9dcf63a10a].

9
10
11
12
13
14
15



16
17
18
19
20
21







22




23




24






25







26
27
 * the packaging of this file.
 */

#import <wchar.h>
#import <stddef.h>
#import "OFString.h"




@interface OFConstWideCString: OFString
{
	const wchar_t *string;
	size_t	      length;
}








- initAsConstWideCString: (const wchar_t*)wstr;




- (const wchar_t*)wcString;




- (size_t)length;






- (OFString*)clone;







- (int)compareTo: (OFString*)str;
@end







>
>
>






>
>
>
>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>
>
>

>
>
>
>
>
>
>


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
 * the packaging of this file.
 */

#import <wchar.h>
#import <stddef.h>
#import "OFString.h"

/**
 * An OFString using a constant wide C string as internal storage.
 */
@interface OFConstWideCString: OFString
{
	const wchar_t *string;
	size_t	      length;
}

/**
 * Initializes an already allocated OFConstWideCString.
 * 
 * \param str A constant wide C string to initialize the OFConstWideCString
 * 	  with.
 * \returns An initialized OFConstWideCString
 */
- initAsConstWideCString: (const wchar_t*)wstr;

/**
 * \return The OFConstWideCString as a constant wide C string.
 */
- (const wchar_t*)wcString;

/**
 * \return The length of the OFConstWideCString.
 */
- (size_t)length;

/**
 * Clones the OFConstWideCString, creating a new one.
 * 
 * \return A copy of the OFConstWideCString
 */
- (OFString*)clone;

/**
 * Compares the OFConstWideCString to another OFString.
 *
 * \param str An OFString in a compatible type to compare with
 * \return An integer which is the result of the comparison, see wcscmp.
 */
- (int)compareTo: (OFString*)str;
@end

Modified src/OFMacros.h from [6cc9a6a558] to [3fdd6eaada].

1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
/*
 * Copyright (c) 2008
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of libobjfw. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */


#define OF_NOT_IMPLEMENTED(ret)						\
	[[OFNotImplementedException newWithObject: self			\
				      andSelector: _cmd] raise];	\
	return ret;

#ifdef OF_BIG_ENDIAN
static inline void











>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * Copyright (c) 2008
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * All rights reserved.
 *
 * This file is part of libobjfw. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

/* Return is only to make the compiler happy - it is never reached */
#define OF_NOT_IMPLEMENTED(ret)						\
	[[OFNotImplementedException newWithObject: self			\
				      andSelector: _cmd] raise];	\
	return ret;

#ifdef OF_BIG_ENDIAN
static inline void

Modified src/OFObject.h from [1c8d9403e3] to [2a153af38a].

53
54
55
56
57
58
59

60
61
62
63
64
65
66
67
68
69

70
71
72
73
74
75
76
 */
- (void*)getMemForNItems: (size_t)nitems
		  ofSize: (size_t)size;

/**
 * Resize memory in the memory pool to a specified size.
 *

 * \param size The new size for the memory chunk
 * \return A pointer to the resized memory chunk
 */
- (void*)resizeMem: (void*)ptr
	    toSize: (size_t)size;

/**
 * Resize memory in the memory pool to a specific number of items of a
 * specified size.
 *

 * \param nitems The number of items to resize to
 * \param size The size of each item to resize to
 * \return A pointer to the resized memory chunk
 */
- (void*)resizeMem: (void*)ptr
	  toNItems: (size_t)nitems
	    ofSize: (size_t)size;







>










>







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
 */
- (void*)getMemForNItems: (size_t)nitems
		  ofSize: (size_t)size;

/**
 * Resize memory in the memory pool to a specified size.
 *
 * \param ptr A pointer to the already allocated memory
 * \param size The new size for the memory chunk
 * \return A pointer to the resized memory chunk
 */
- (void*)resizeMem: (void*)ptr
	    toSize: (size_t)size;

/**
 * Resize memory in the memory pool to a specific number of items of a
 * specified size.
 *
 * \param ptr A pointer to the already allocated memory
 * \param nitems The number of items to resize to
 * \param size The size of each item to resize to
 * \return A pointer to the resized memory chunk
 */
- (void*)resizeMem: (void*)ptr
	  toNItems: (size_t)nitems
	    ofSize: (size_t)size;

Modified src/OFWideCString.h from [8140132478] to [ea45f8fc70].

10
11
12
13
14
15
16



17
18
19
20
21
22






23




24




25






26







27






28






29
30
 */

#import <wchar.h>
#import <stddef.h>

#import "OFString.h"




@interface OFWideCString: OFString
{
	wchar_t	*string;
	size_t  length;
}







- initAsWideCString: (wchar_t*)str;




- (wchar_t*)wcString;




- (size_t)length;






- (OFString*)clone;







- (int)compareTo: (OFString*)str;






- append: (OFString*)str;






- appendWideCString: (const wchar_t*)str;
@end







>
>
>






>
>
>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>

>
>
>
>
>
>


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
 */

#import <wchar.h>
#import <stddef.h>

#import "OFString.h"

/**
 * An OFString using a wide C string as internal storage.
 */
@interface OFWideCString: OFString
{
	wchar_t	*string;
	size_t  length;
}

/**
 * Initializes an already allocated OFWideCString.
 * 
 * \param str A wide C string to initialize the OFWideCString with.
 * \returns An initialized OFWideCString
 */
- initAsWideCString: (wchar_t*)str;

/**
 * \return The OFWideCString as a wide C string.
 */
- (wchar_t*)wcString;

/**
 * \return The length of the OFWideCString.
 */
- (size_t)length;

/**
 * Clones the OFWideCString, creating a new one.
 * 
 * \return A copy of the OFWideCString
 */
- (OFString*)clone;

/**
 * Compares the OFWideCString to another OFString.
 *
 * \param str An OFString in a compatible type to compare with
 * \return An integer which is the result of the comparison, see wcscmp.
 */
- (int)compareTo: (OFString*)str;

/**
 * Append another OFString to the OFWideCString.
 *
 * \param str An OFString in a compatible type to append
 */
- append: (OFString*)str;

/**
 * Append a wide C string to the OFWideCString.
 *
 * \param str A wide C string to append
 */
- appendWideCString: (const wchar_t*)str;
@end