?? object.h
字號:
#ifndef __object_h
#define __object_h
///////////////////////////////////////////////////////////////////////////////
// $Header: /shorthand/src/object.h 4 1/09/03 7:14p Arm $
//-----------------------------------------------------------------------------
// Project: ShortHand interpreter
// Author: Andrei Remenchuk <andrei@remenchuk.com>
//-----------------------------------------------------------------------------
// object.h: ShortHand object interface
///////////////////////////////////////////////////////////////////////////////
#include "value.h"
#include "map.h"
#include "yydef.h"
class ShhModule;
/**
* ShortHand object.
*/
class ShhObject
{
protected:
string m_type;
ShhModule& m_module;
// location where the object was constructed
YYLTYPE m_ctor_location;
map<ShhValue> m_properties;
public:
ShhObject(ShhModule& module, const char* type, const YYLTYPE& location);
const char* getTypeName() const { return m_type; }
virtual void setProperty(const char* name, ShhValue value);
virtual ShhValue& getProperty(const char* name);
virtual void constructor(ShhValueList* args) = 0;
virtual ShhValue executeMethod(const char* name, ShhValueList* args) = 0;
virtual bool hasMethod(const char* name) = 0;
virtual ~ShhObject();
};
#endif // __object_h
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -