Permalink
Browse files

constants, feat: support constants module.

  • Loading branch information...
xicilion committed Nov 16, 2017
1 parent 39171af commit 575deddaac1ebbf298cfc7f54dd089b616697509
View
@@ -292,6 +292,7 @@
<ClInclude Include="include\ifs\base64vlq.h" />
<ClInclude Include="include\ifs\bson.h" />
<ClInclude Include="include\ifs\console.h" />
<ClInclude Include="include\ifs\constants.h" />
<ClInclude Include="include\ifs\coroutine.h" />
<ClInclude Include="include\ifs\crypto.h" />
<ClInclude Include="include\ifs\db.h" />
@@ -476,6 +477,7 @@
<ClCompile Include="src\os\os_win.cpp" />
<ClCompile Include="src\os\registry.cpp" />
<ClCompile Include="src\other\Image.cpp" />
<ClCompile Include="src\other\constants.cpp" />
<ClCompile Include="src\other\uuid.cpp" />
<ClCompile Include="src\process\SubProcess.cpp" />
<ClCompile Include="src\process\SubProcess_posix.cpp" />
@@ -714,6 +714,9 @@
<ClInclude Include="include\ifs\console.h">
<Filter>Header Files\ifs</Filter>
</ClInclude>
<ClInclude Include="include\ifs\constants.h">
<Filter>Header Files\ifs</Filter>
</ClInclude>
<ClInclude Include="include\ifs\coroutine.h">
<Filter>Header Files\ifs</Filter>
</ClInclude>
@@ -1253,6 +1256,9 @@
<ClCompile Include="src\other\Image.cpp">
<Filter>Source Files\other</Filter>
</ClCompile>
<ClCompile Include="src\other\constants.cpp">
<Filter>Source Files\other</Filter>
</ClCompile>
<ClCompile Include="src\other\uuid.cpp">
<Filter>Source Files\other</Filter>
</ClCompile>
View
@@ -292,6 +292,7 @@
<ClInclude Include="include\ifs\base64vlq.h" />
<ClInclude Include="include\ifs\bson.h" />
<ClInclude Include="include\ifs\console.h" />
<ClInclude Include="include\ifs\constants.h" />
<ClInclude Include="include\ifs\coroutine.h" />
<ClInclude Include="include\ifs\crypto.h" />
<ClInclude Include="include\ifs\db.h" />
@@ -476,6 +477,7 @@
<ClCompile Include="src\os\os_win.cpp" />
<ClCompile Include="src\os\registry.cpp" />
<ClCompile Include="src\other\Image.cpp" />
<ClCompile Include="src\other\constants.cpp" />
<ClCompile Include="src\other\uuid.cpp" />
<ClCompile Include="src\process\SubProcess.cpp" />
<ClCompile Include="src\process\SubProcess_posix.cpp" />
@@ -714,6 +714,9 @@
<ClInclude Include="include\ifs\console.h">
<Filter>Header Files\ifs</Filter>
</ClInclude>
<ClInclude Include="include\ifs\constants.h">
<Filter>Header Files\ifs</Filter>
</ClInclude>
<ClInclude Include="include\ifs\coroutine.h">
<Filter>Header Files\ifs</Filter>
</ClInclude>
@@ -1253,6 +1256,9 @@
<ClCompile Include="src\other\Image.cpp">
<Filter>Source Files\other</Filter>
</ClCompile>
<ClCompile Include="src\other\constants.cpp">
<Filter>Source Files\other</Filter>
</ClCompile>
<ClCompile Include="src\other\uuid.cpp">
<Filter>Source Files\other</Filter>
</ClCompile>
@@ -0,0 +1,49 @@
/***************************************************************************
* *
* This file was automatically generated using idlc.js *
* PLEASE DO NOT EDIT!!!! *
* *
***************************************************************************/
#ifndef _constants_base_H_
#define _constants_base_H_
/**
@author Leo Hoo <lion@9465.net>
*/
#include "../object.h"
namespace fibjs {
class constants_base : public object_base {
DECLARE_CLASS(constants_base);
public:
static void s__new(const v8::FunctionCallbackInfo<v8::Value>& args)
{
CONSTRUCT_INIT();
Isolate* isolate = Isolate::current();
isolate->m_isolate->ThrowException(
isolate->NewString("not a constructor"));
}
};
}
namespace fibjs {
inline ClassInfo& constants_base::class_info()
{
static ClassData s_cd = {
"constants", true, s__new, NULL,
0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, NULL,
&object_base::class_info()
};
static ClassInfo s_ci(s_cd);
return s_ci;
}
}
#endif
@@ -0,0 +1,13 @@
/*
* constants.cpp
*
* Created on: Nov 16, 2017
* Author: lion
*/
#include "object.h"
#include "ifs/constants.h"
namespace fibjs {
DECLARE_MODULE(constants);
} /* namespace fibjs */
View
@@ -0,0 +1,10 @@
/*! @brief 常用常量定义模块
引用方法:
```JavaScript
var constants = require('constants');
```
*/
module constants
{
};

0 comments on commit 575dedd

Please sign in to comment.