# web.layout.valueObject 库模块帮助文档

## web.layout 成员列表 <a id="web.layout" href="#web.layout">&#x23;</a>

### web.layout.valueObject() <a id="web.layout.valueObject" href="#web.layout.valueObject">&#x23;</a>
[返回对象:webLayoutValueObject](#webLayoutValueObject)

### web.layout.valueObject(初始值,单位,类型) <a id="web.layout.valueObject" href="#web.layout.valueObject">&#x23;</a>
创建并返回动态值类型,  
所有参数可选

### web.layout.valueObjectLite() <a id="web.layout.valueObjectLite" href="#web.layout.valueObjectLite">&#x23;</a>
无GC值对象,避免自动释放,  

[返回对象:webLayoutValueObject](#webLayoutValueObject)

## webLayoutValueObject 成员列表 <a id="webLayoutValueObject" href="#webLayoutValueObject">&#x23;</a>

### webLayoutValueObject.addRef() <a id="webLayoutValueObject.addRef" href="#webLayoutValueObject.addRef">&#x23;</a>
添加引用计数

### webLayoutValueObject.clear() <a id="webLayoutValueObject.clear" href="#webLayoutValueObject.clear">&#x23;</a>
清空值

### webLayoutValueObject.clone() <a id="webLayoutValueObject.clone" href="#webLayoutValueObject.clone">&#x23;</a>
复制值  

[返回对象:webLayoutValueObject](#webLayoutValueObject)

### webLayoutValueObject.enum(枚举函数) <a id="webLayoutValueObject.enum" href="#webLayoutValueObject.enum">&#x23;</a>

```aardio
webLayoutValueObject.enum(   
	function(k,v ){  
		io.print( k,v )   
	}  
)
```

### webLayoutValueObject.getBinary() <a id="webLayoutValueObject.getBinary" href="#webLayoutValueObject.getBinary">&#x23;</a>
返回 字节串（buffer 类型）  
零长度数组返回 null

### webLayoutValueObject.getEle() <a id="webLayoutValueObject.getEle" href="#webLayoutValueObject.getEle">&#x23;</a>
返回节点对象,  
注意:节点类型只能读取不能写入

### webLayoutValueObject.getInt32() <a id="webLayoutValueObject.getInt32" href="#webLayoutValueObject.getInt32">&#x23;</a>
返回整型数值  
如果值类型不是整型值,取值返回空

### webLayoutValueObject.getItem() <a id="webLayoutValueObject.getItem" href="#webLayoutValueObject.getItem">&#x23;</a>
[返回对象:webLayoutValueObject](#webLayoutValueObject)

### webLayoutValueObject.getItem(索引) <a id="webLayoutValueObject.getItem" href="#webLayoutValueObject.getItem">&#x23;</a>
获取成员

### webLayoutValueObject.getLong64() <a id="webLayoutValueObject.getLong64" href="#webLayoutValueObject.getLong64">&#x23;</a>
返回长整型数值  
如果值类型不是长整型数值,取值返回空

### webLayoutValueObject.getNumber() <a id="webLayoutValueObject.getNumber" href="#webLayoutValueObject.getNumber">&#x23;</a>
返回浮点数值  
如果值类型不是浮点数,取值返回空  
使用 tonumber() 函数可强制返回数值

### webLayoutValueObject.getString() <a id="webLayoutValueObject.getString" href="#webLayoutValueObject.getString">&#x23;</a>
返回字符串值  
如果值类型字符串值,取值返回空  
使用 tostring() 函数可强制返回数值

### webLayoutValueObject.getTime() <a id="webLayoutValueObject.getTime" href="#webLayoutValueObject.getTime">&#x23;</a>
返回时间值  
如果值类型不是时间值,取值返回空

### webLayoutValueObject.getType() <a id="webLayoutValueObject.getType" href="#webLayoutValueObject.getType">&#x23;</a>
返回值类型 _HL_T_ 前缀常量表示

### webLayoutValueObject.getValue() <a id="webLayoutValueObject.getValue" href="#webLayoutValueObject.getValue">&#x23;</a>
返回字符串值、数值、时间值

### webLayoutValueObject.isArray() <a id="webLayoutValueObject.isArray" href="#webLayoutValueObject.isArray">&#x23;</a>
是否数组对象

### webLayoutValueObject.isDomObject() <a id="webLayoutValueObject.isDomObject" href="#webLayoutValueObject.isDomObject">&#x23;</a>
是否节点对象,  
使用 getEle()函数转换为节点对象

### webLayoutValueObject.isMap() <a id="webLayoutValueObject.isMap" href="#webLayoutValueObject.isMap">&#x23;</a>
是否键值表对象

### webLayoutValueObject.jsonParse('{ k:"v" }') <a id="webLayoutValueObject.jsonParse" href="#webLayoutValueObject.jsonParse">&#x23;</a>
解析JSON字符串

### webLayoutValueObject.jsonStringify() <a id="webLayoutValueObject.jsonStringify" href="#webLayoutValueObject.jsonStringify">&#x23;</a>
转换并返回JSON字符串

### webLayoutValueObject.length <a id="webLayoutValueObject.length" href="#webLayoutValueObject.length">&#x23;</a>
数组长度

### webLayoutValueObject.parse("10pt") <a id="webLayoutValueObject.parse" href="#webLayoutValueObject.parse">&#x23;</a>
解析字符串

### webLayoutValueObject.setBinary(buffer,len) <a id="webLayoutValueObject.setBinary" href="#webLayoutValueObject.setBinary">&#x23;</a>
设置二进制字节串,  
如果参数@1是buffer、字符串,可选用参数@2指定长度,  
如果参数@1是指针,则必须指定长度

### webLayoutValueObject.setInt32(数值) <a id="webLayoutValueObject.setInt32" href="#webLayoutValueObject.setInt32">&#x23;</a>
写入整型数值

### webLayoutValueObject.setItem(索引,值) <a id="webLayoutValueObject.setItem" href="#webLayoutValueObject.setItem">&#x23;</a>
设置成员值

### webLayoutValueObject.setLong64(数值) <a id="webLayoutValueObject.setLong64" href="#webLayoutValueObject.setLong64">&#x23;</a>
写入长整型数值

### webLayoutValueObject.setNumber(数值) <a id="webLayoutValueObject.setNumber" href="#webLayoutValueObject.setNumber">&#x23;</a>
写入浮点数值

### webLayoutValueObject.setString(字符串值) <a id="webLayoutValueObject.setString" href="#webLayoutValueObject.setString">&#x23;</a>
写入字符串值

### webLayoutValueObject.setTime(时间值) <a id="webLayoutValueObject.setTime" href="#webLayoutValueObject.setTime">&#x23;</a>
写入时间值

### webLayoutValueObject.setValue(值,单位,类型) <a id="webLayoutValueObject.setValue" href="#webLayoutValueObject.setValue">&#x23;</a>
写入字符串值、数值、时间值  
参数2,参数3为可选参数

### webLayoutValueObject.stringify() <a id="webLayoutValueObject.stringify" href="#webLayoutValueObject.stringify">&#x23;</a>
转换并返回字符串

### webLayoutValueObject.value <a id="webLayoutValueObject.value" href="#webLayoutValueObject.value">&#x23;</a>
读取或写入字符串值、数值、时间值

### 自动完成常量
_HL_CVT_JSON_LITERAL=1  
_HL_CVT_JSON_MAP=2  
_HL_CVT_SIMPLE=0  
