object.h

来自「这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数」· C头文件 代码 · 共 69 行

H
69
字号
////               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 Intel Corporation. All Rights Reserved.//#ifndef __OBJECT_H#define __OBJECT_H#include "vm_strings.h"#include "vm_shared_object.h"class Object{public:    Object*   m_pnext;//    Object*   m_pprev;public:        virtual ~Object(void) = 0;        virtual void*    Create() = 0;        virtual void     Destroy(void*) = 0;        virtual vm_char* GetName() = 0;        virtual vm_char* GetVersion() = 0;        virtual int      Try(void*) = 0; /* <0 - not implemented,                                            =0 - not supported,                                            >0 - supported       */    virtual vm_char* GetObjectType(void) = 0;//    static  vm_char* GetStaticObjectType(void);};struct ObjectsList{    Object*      p_begin;    ObjectsList* p_next;    vm_so_handle handle;    static ObjectsList* Load(vm_char*, vm_char* = NULL);    static bool         Free(ObjectsList*);};bool ObjectReg(Object*);extern ObjectsList g_static_objects_list;#define OBJECT_TYPE_DECL()\    public:\    static  vm_char* m_object_type;\    virtual vm_char* GetObjectType();\    static  vm_char* GetStaticObjectType();#define OBJECT_TYPE_IMPL(class_name)\vm_char* class_name::m_object_type = VM_STRING(#class_name);\vm_char* class_name::GetObjectType(){ return m_object_type;}\vm_char* class_name::GetStaticObjectType(){ return m_object_type;}bool ObjectTypeCheck(Object* p_object);template <class T>bool ObjectTypeCheck(T* p_object){    return !vm_string_strcmp(T::GetStaticObjectType(),p_object->GetObjectType());}#endif//__OBJECT_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?