Yoba Perl
Main Page
Classes
Files
File List
scalar.hpp
1
#ifndef YOBAPERL_SCALAR_HPP
2
#define YOBAPERL_SCALAR_HPP
3
4
#include "yobaperl/common.hpp"
5
#include "yobaperl/variable.hpp"
6
7
namespace
yoba
{
8
9
10
11
//TODO sv_grow
12
//TODO sv_insert
24
class
YOBAPERL_EXPORT
Scalar
:
public
Variable
25
{
26
public
:
27
28
29
36
Scalar
(
Perl
& perl, SV * sv,
bool
increase_refcount);
37
38
39
41
48
Scalar
& setValue(
const
std::string & value);
49
Scalar
& setValue(
const
char
* value);
50
57
Scalar
& setValue(IV value);
58
Scalar
& setValue(
int
value);
59
66
Scalar
& setValue(UV value);
67
Scalar
& setValue(
unsigned
value);
68
75
Scalar
& setValue(NV value);
76
Scalar
& setValue(
float
value);
77
84
Scalar
& setValue(
bool
value);
85
86
93
std::string toString()
const
;
94
101
IV toIV()
const
;
102
109
UV toUV()
const
;
110
117
NV toNV()
const
;
118
125
bool
toBool()
const
;
126
133
Scalar
unrefScalar()
const
;
134
141
Array
unrefArray()
const
;
142
149
Hash
unrefHash()
const
;
150
157
Code
unrefCode()
const
;
158
160
161
162
164
171
I32 getLength()
const
;
172
179
Scalar
makeCopy()
const
;
180
187
Scalar
makeRef()
const
;
188
195
bool
isRef()
const
;
196
203
bool
isScalarRef()
const
;
204
211
bool
isArrayRef()
const
;
212
219
bool
isHashRef()
const
;
220
227
bool
isCodeRef()
const
;
228
235
bool
isObject()
const
;
236
243
bool
isObjectOf(
const
std::string & class_name)
const
;
244
253
bool
isValidNumber()
const
;
254
256
257
258
260
267
template
<
typename
ValueT>
268
Scalar
& operator= (
const
ValueT & value);
269
276
operator
bool()
const
;
277
279
280
281
282
};
283
284
#include "yobaperl/scalar.tpp"
285
286
287
288
}
// namespace yoba
289
290
#endif // YOBAPERL_SCALAR_HPP
yoba::Array
Array reference
Definition:
array.hpp:26
yoba
Definition:
array.cpp:5
yoba::Hash
Hash reference
Definition:
hash.hpp:22
yoba::Variable
Base class for perl variables.
Definition:
variable.hpp:20
yoba::Perl
Main class.
Definition:
perl.hpp:32
yoba::Code
Subroutine reference
Definition:
code.hpp:15
yoba::Scalar
Scalar reference
Definition:
scalar.hpp:24
include
yobaperl
scalar.hpp
Generated by
1.8.11