📄 factory.cpp
字号:
//
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright (c) 2005-2006 Intel Corporation. All Rights Reserved.
//
#include "factory.h"
#include "object.h"
#include "vm_strings.h"
#include "vm_shared_object.h"
Factory::Factory()
{
m_objects_list.p_begin = NULL;
m_objects_list.p_next = NULL;
m_objects_list.handle = NULL;
}
Factory::~Factory()
{
}
bool Factory::Load(vm_char* p_filename, vm_char* p_funcname)
{
ObjectsList* p_list;
p_list = ObjectsList::Load(p_filename,p_funcname);
return RegObjectsList(p_list);
}
bool Factory::InitStatic(void)
{
if (g_static_objects_list.p_begin) {
m_objects_list.p_begin = g_static_objects_list.p_begin;
return true;
}
return false;
}
bool Factory::RegObjectsList(ObjectsList* p_list)
{
ObjectsList* p_counter;
if (p_list == NULL || p_list->p_next != NULL) {
return false;
}
p_counter = &m_objects_list;
while (p_counter->p_next != NULL) p_counter = p_counter->p_next;
p_counter->p_next = p_list;
return true;
}
ObjectsList* Factory::GetObjectsList(void)
{
return &m_objects_list;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -