---
name: "CL_LuaValue"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_LuaValue"
---

# CL\_LuaValue(3)

Lua value

## NAME

CL\_LuaValue - Lua value

## DESCRIPTION

Represents a value that can be passed to Lua. When calling Lua functions or indexing Lua tables, objects of this class are expected. However, they are implicitly constructed from C++ primitive types. Thus, in general, there is no need to directly create objects of this class. \* Copying from LuaObject To convert a LuaValue from a LuaObject is \_not\_ allowed.

## CLASS MEMBERS

- **CL\_LuaValue**(

  ```
  void)
  ```

- **CL\_LuaValue**(

  ```
  int v)
  ```

- **CL\_LuaValue**(

  ```
  float v)
  ```

- **CL\_LuaValue**(

  ```
  double v)
  ```

- **CL\_LuaValue**(

  ```
  char* v)
  ```

- **CL\_LuaValue**(

  ```
  const CL_LuaValue& v)
  ```

- **CL\_LuaValue**(

  ```
  lua_CFunction v)
  ```

- **CL\_LuaValue**(

  ```
  void* v,
  int tag=LUA_PP_USERDATA)
  ```

- **CL\_LuaValue**(

  ```
  const void* v,
  int tag=LUA_PP_USERDATA)
  ```

- **CL\_LuaValue**(

  ```
  const CL_LuaValue& v)
  ```

- CL\_LuaValue& **operator=** (

  ```
  const CL_LuaValue& v)
  ```

- virtual **~CL\_LuaValue**(

  ```
  void)
  ```

- virtual void **push**(

  ```
  void)
  ```

- void **store**(

  ```
  char* varname)
  ```

- virtual int **isNil**(

  ```
  void)
  ```

- virtual int **isNumber**(

  ```
  void)
  ```

- virtual int **isString**(

  ```
  void)
  ```

- virtual int **isTable**(

  ```
  void)
  ```

- virtual int **isFunction**(

  ```
  void)
  ```

- virtual int **isUserData**(

  ```
  void)
  ```

- virtual int **type**(

  ```
  void)
  ```

- virtual operator **float**()

  - virtual operator const **char\***()

  - virtual operator const **char\***()

  - virtual operator const **void\***()

  - virtual operator const **void\***()

  ## MEMBERS WITH DESCRIPTIONS

- **CL\_LuaValue**(

  ```
  void)
  ```

  ```
  Description:
  ```

  Create a *nil* object

- **CL\_LuaValue**(

  ```
  int v)
  ```

  ```
  Description:
  ```

  Create a *number* from an *int*

- **CL\_LuaValue**(

  ```
  float v)
  ```

  ```
  Description:
  ```

  Create a *number* from a *float*

- **CL\_LuaValue**(

  ```
  double v)
  ```

  ```
  Description:
  ```

  Create a *number* from a *double*

- **CL\_LuaValue**(

  ```
  char* v)
  ```

  ```
  Description:
  ```

  Create a *string* from a *char\**

- **CL\_LuaValue**(

  ```
  const CL_LuaValue& v)
  ```

  ```
  Description:
  ```

  Create a *string* from a *const char\**Copy and assignment	 not implemented \* Assigning a LuaObject Assigning a LuaObject is \_not\_ allowed.

- **CL\_LuaValue**(

  ```
  lua_CFunction v)
  ```

  ```
  Description:
  ```

  Create a *cfunction* from a 'lua\_CFunction}

- **CL\_LuaValue**(

  ```
  void* v,
  int tag=LUA_PP_USERDATA)
  ```

  ```
  Description:
  ```

  Create a *userdata* from a *void\**

- **CL\_LuaValue**(

  ```
  const void* v,
  int tag=LUA_PP_USERDATA)
  ```

  ```
  Description:
  ```

  Create a *userdata* from a *const void\**

- **CL\_LuaValue**(

  ```
  const CL_LuaValue& v)
  ```

  ```
  Description:
  ```

  Create a *string* from a *const char\**Copy and assignment	 not implemented \* Assigning a LuaObject Assigning a LuaObject is \_not\_ allowed.

- CL\_LuaValue& **operator=** (

  ```
  const CL_LuaValue& v)
  ```

  ```
  Description:
  ```

  not implemented

- virtual **~CL\_LuaValue**(

  ```
  void)
  ```

  ```
  Description:
  ```

  \* MANIPULATORS

- virtual void **push**(

  ```
  void)
  ```

  ```
  Description:
  ```

  Push Pushs the value onto Lua stack.

- void **store**(

  ```
  char* varname)
  ```

  ```
  Description:
  ```

  Store Stores the value in a given Lua global variable. \* ACCESSORS

- virtual int **isNil**(

  ```
  void)
  ```

  ```
  Description:
  ```

  Query if *nil*

- virtual int **isNumber**(

  ```
  void)
  ```

  ```
  Description:
  ```

  Query if *number*

- virtual int **isString**(

  ```
  void)
  ```

  ```
  Description:
  ```

  Query if *string*

- virtual int **isTable**(

  ```
  void)
  ```

  ```
  Description:
  ```

  Query if *table* never happens

- virtual int **isFunction**(

  ```
  void)
  ```

  ```
  Description:
  ```

  Query if *function*

- virtual int **isUserData**(

  ```
  void)
  ```

  ```
  Description:
  ```

  Query if *userdata*

- virtual int **type**(

  ```
  void)
  ```

  ```
  Description:
  ```

  Return the corresponding Lua type \* CONVERSORS Allow conversion to C++ primitive types.

- virtual operator **float**()

  ```
  Description:
  ```

  Convert to *float*

- virtual operator const **char\***()

  ```
  Description:
  ```

  Convert to {char\*}Convert to {const char\*}

- virtual operator const **char\***()

  ```
  Description:
  ```

  Convert to {char\*}Convert to {const char\*}

- virtual operator const **void\***()

  ```
  Description:
  ```

  Convert to {void\*}	Convert to {const void\*}

- virtual operator const **void\***()

  ```
  Description:
  ```

  Convert to {void\*}	Convert to {const void\*}

## SEE ALSO

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
