Kiwi Engine
VM for interpreter
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Functions
KEFrame.h File Reference

Define KEFrame class. More...

#include <Coconut/Coconut.h>
#include "KEForwarders.h"
#include "KEObject.h"

Go to the source code of this file.

Data Structures

struct  KEFrame
 

Functions

struct KEFrameKEAllocateFrame (struct CNResource *resource)
 Alloxate KEPath object. More...
 
CNBoolean KEAddValueToThisFrame (struct KEFrame *dst, const struct CNFixedString *ident, const struct KEValue *val, struct KELineInfo *linfo)
 Add slot to frame. More...
 
CNBoolean KEAddSlotToThisFrame (struct KEFrame *dst, struct KESlot *src)
 Add slot to frame. More...
 
CNBoolean KEUpdateValueInThisFrame (struct KEFrame *dst, const struct CNFixedString *ident, const struct KEValue *val)
 Update value in frame pointed by the identifier. More...
 
CNBoolean KEUpdateValueInFrame (struct KEFrame *dst, struct KEPath *path, const struct KEValue *val)
 Set value to frame pointed by the path. More...
 
struct KEValueKEValueInThisFrame (struct KEFrame *frame, const struct CNFixedString *ident)
 Get value in frame pointed by identifier. More...
 
struct KEValueKEValueInFrame (struct KEFrame *frame, struct KEPath *path)
 Get value in frame pointed by path. More...
 

Detailed Description

Define KEFrame class.

Copyright
Copyright (C) 2014 Steel Wheels Project

Function Documentation

CNBoolean KEAddSlotToThisFrame ( struct KEFrame dst,
struct KESlot src 
)

Add slot to frame.

Return values
TrueNo error
FalseSome errors are occured
Parameters
dstDestination frame
srcSource slot
Warning
This functions DOES NOT check the identifier is already exist or not. Do not add multiple slots which has same identifier.
CNBoolean KEAddValueToThisFrame ( struct KEFrame dst,
const struct CNFixedString *  ident,
const struct KEValue val,
struct KELineInfo linfo 
)

Add slot to frame.

Return values
TrueNo error
FalseSome errors are occured
Parameters
dstDestination frame
identIdentifier of the new slot
valValue of new slot
linfoLine information of the new slot
Warning
This functions DOES NOT check the identifier is already exist or not. Do not add multiple slots which has same identifier.
struct KEFrame* KEAllocateFrame ( struct CNResource *  resource)

Alloxate KEPath object.

Returns
Allocated object
Parameters
resourceResource to allocate the object
CNBoolean KEUpdateValueInFrame ( struct KEFrame dst,
struct KEPath path,
const struct KEValue val 
)

Set value to frame pointed by the path.

Return values
TrueSet operation suceeded
FalseFailed to set the value
Parameters
dstDestination frame
pathPath of the source value
valSource value to set
CNBoolean KEUpdateValueInThisFrame ( struct KEFrame dst,
const struct CNFixedString *  ident,
const struct KEValue val 
)

Update value in frame pointed by the identifier.

Return values
TrueThe value is updated
FalseThe matched slot is not found
Parameters
dstDestination frame
identIdentifier of the slot value
valSource value to set
struct KEValue* KEValueInFrame ( struct KEFrame frame,
struct KEPath path 
)

Get value in frame pointed by path.

Return values
valPointed value
NULLNo such path in the frame
Parameters
frameRoot frame to be searched
pathPath of the target value
struct KEValue* KEValueInThisFrame ( struct KEFrame frame,
const struct CNFixedString *  ident 
)

Get value in frame pointed by identifier.

Return values
valPointed value
NULLNo such path in the frame
Parameters
frameRoot frame to be searched
identIdentifier of the slot in the frame