INGOR
Loading...
Searching...
No Matches
lang
ytValue.h
1
/*
2
lang/ytValue.{h,c} : Arbitrary value wrapper
3
Copyright (C) 2018, Yoshinori Tamada <tamada A T ytlab.jp>
4
All rights reserved.
5
6
See LICENSE.txt for details of the licensing agreement.
7
*/
8
9
#ifndef __YTLIB_VALUE_H
10
#define __YTLIB_VALUE_H
11
12
#include "ytObject.h"
13
14
typedef
struct
{
15
ytObject
obj;
16
void
* ptr;
17
}
ytValue
;
18
19
ytValue
* ytValue_new(
void
* ptr,
ytType
type);
20
void
ytValue_delete(
void
*
this
);
21
ytObject
* ytValue_newObject(
void
* ptr,
ytType
type);
22
ytObject
* ytValue_NULL();
23
void
* ytValue_ptr(
ytObject
*
this
);
24
ytObject
* ytValue_char_ptr(
char
* ptr);
25
ytObject
* ytCHAR_PTR(
char
* ptr);
26
ytObject
* ytValue_obj(
ytValue
* val);
27
ytObject
* ytValue_charP(
char
* ptr);
28
ytObject
* ytValue_charPP(
char
** ptr);
29
ytObject
* ytValue_str(
char
* ptr);
30
ytObject
* ytValue_strCopy(
const
char
* ptr);
31
ytObject
* ytValue_int(
int
value);
32
int
ytValue_intValue(
const
ytObject
*
this
);
33
void
ytValue_intSet(
ytObject
* obj,
int
value);
34
ytObject
* ytValue_intP(
int
* ptr);
35
ytObject
* ytValue_double(
double
value);
36
double
ytValue_doubleValue(
const
ytObject
* obj);
37
void
ytValue_doubleSet(
ytObject
* obj,
double
value);
38
ytObject
* ytValue_doubleP(
double
* ptr);
39
char
* ytValue_to_char_ptr(
ytValue
* obj);
40
char
* ytValue_strValue(
const
ytObject
* obj);
41
char
* ytValue_objCharP(
ytObject
* obj);
42
ytObject
* ytValue_size_t(
size_t
value);
43
size_t
ytValue_size_tValue(
const
ytObject
* obj);
44
void
* ytValue_objVoidP(
ytObject
* obj);
45
void
ytValue_setINT_PR(
ytObject
* a,
int
v);
46
void
ytValue_setUINT_PR(
ytObject
* a,
unsigned
int
v);
47
void
ytValue_setDOUBLE_PR(
ytObject
* a,
double
v);
48
void
ytValue_setCHAR_PPR(
ytObject
* a,
char
* v);
49
50
#endif
/* __YTLIB_VALUE_H */
ytObject
The basis class.
ytType
ytType
Types supported by ytLib.
Definition
ytType.h:14
ytValue
Wrapper class for primitive and other arbitrary types.
Definition
ytValue.h:14
Generated by
1.9.8