Skip to content

Commit b091faa

Browse files
committed
API function registerLicense() added in DxJtEntityFactory class
1 parent c3e223e commit b091faa

File tree

13 files changed

+21
-0
lines changed

13 files changed

+21
-0
lines changed

examples/osgexamples/Plugins jt/load_jt.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ bool ConvertJtLSGNode::preActionCallback(std::shared_ptr<DxJtHierarchy> CurrNode
179179

180180
osg::Node* load_jt(const wchar_t *filename, const osgDB::ReaderWriter::Options* options)
181181
{
182+
if (!DxJtEntityFactory::registerLicense())
183+
return nullptr;
184+
182185
std::shared_ptr<DxJtCADImporter> importer = DxJtEntityFactory::createCADImporter();
183186
if (importer == nullptr)
184187
return nullptr;

examples/traverse/traverse.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ int main(int argc, char* argv[])
2727
else
2828
fileName = "..\\..\\samples\\opening_protection_plate1_jt9.5.jt";
2929

30+
if (!DxJtEntityFactory::registerLicense())
31+
return -1;
32+
3033
wchar_t buf_wstr[_MAX_PATH];
3134
size_t numConverted = 0;
3235
size_t flen = strlen(fileName);

include/DxJtEntityFactory.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@
2727
class JT_TOOLKIT_EXPORT DxJtEntityFactory
2828
{
2929
public:
30+
enum LICENSE_HINT_TYPE
31+
{
32+
LICENSE_DLL_PATH,
33+
LICENSE_DATA,
34+
};
35+
struct LicenseLoc
36+
{
37+
LICENSE_HINT_TYPE licenseHint;
38+
char licenseData[1024];
39+
};
40+
/**
41+
* @brief Register license.
42+
*/
43+
static bool registerLicense(const LicenseLoc* licenseLocation = nullptr);
44+
3045
/**
3146
* @brief Creates a new JtCADImporter object.
3247
*/

x64_v141/Debug/dxjt_toolkit.dll

-76 KB
Binary file not shown.

x64_v141/Debug/dxjt_toolkit.lib

426 Bytes
Binary file not shown.

x64_v141/Debug/dxjt_toolkit.pdb

3.9 MB
Binary file not shown.

x64_v141/Debug/libdximpjt.dll

-8.5 KB
Binary file not shown.

x64_v141/Debug/libdximpjt.lib

-7.99 KB
Binary file not shown.

x64_v141/Debug/libdximpjt.pdb

456 KB
Binary file not shown.

x64_v141/Release/dxjt_toolkit.dll

-1 KB
Binary file not shown.

0 commit comments

Comments
 (0)