コード例 #1
0
ファイル: stack.cpp プロジェクト: ImperatorPrime/xoreos
Variable Stack::getVariableAt(int index) const {
	switch (getTypeAt(index)) {
		case kTypeNil:
			return Variable(kTypeNil);
		case kTypeBoolean:
			return getBooleanAt(index);
		case kTypeNumber:
			return getFloatAt(index);
		case kTypeString:
			return getStringAt(index);
		case kTypeTable:
			return getTableAt(index);
		case kTypeFunction:
			return getFunctionAt(index);
		case kTypeUserType: {
			const Common::UString exactType = getExactTypeAt(index);
			return Variable(getRawUserTypeAt(index, exactType), exactType);
		}
		default:
			return Variable(kTypeNone);
	}
}
コード例 #2
0
const char* getFirstString(SlimList *args) {
    return getStringAt(args, 0);
}
コード例 #3
0
int getIntAt(SlimList *args, int index) {
	return atoi(getStringAt(args, index));
}