Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
iedlobject.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2007-2025 Global Graphics Software Ltd. All rights reserved.
3*/
4
9
10#ifndef __EDLOBJECT_H__
11#define __EDLOBJECT_H__
12
13#include <edl/edltypes.h>
14#include <edl/smartptr.h>
15#include <edl/ircobject.h>
16#include <edl/objclassid.h>
17#include <edl/edlerrors.h>
18
20
29
31{
32public:
33 virtual ~CClassParams()
34 {}
35};
36
38class IEDLObject;
40
51
52class IEDLObject : public IRCObject
53{
54public:
55
60 virtual const CClassID &getClassID() const = 0;
61
70 virtual bool init(CClassParams *pData)
71 {
73 return false;
74 }
75
82 virtual bool clone(IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory)
83 {
84 UNREFERENCED_PARAMETER(ptrObject);
85 UNREFERENCED_PARAMETER(pFactory);
86 return false;
87 }
88};
89
90template<class Type>
91CSmartPtr<Type> edl_cast(Type *dst, IEDLObjectPtr src)
92{
94 if (src)
95 return CSmartPtr<Type>((Type *)dynamic_cast<Type *>((IEDLObject *)src), true);
96 else
97 return CSmartPtr<Type>();
98};
99
100
108template <class Type>
110{
111 IEDLObjectPtr cloned;
112 if (!src || !pFactory || !src->clone(cloned, pFactory) || !cloned)
114 CSmartPtr<Type> result = edl_cast((Type*) NULL, cloned);
115 if (!result)
117 return result;
118}
119
121
122#endif /* __EDLOBJECT_H__ */
An object to represent a 128-bit globally unique ID.
Definition objclassid.h:29
EDL Object Interface.
Definition iedlobject.h:31
virtual ~CClassParams()
Definition iedlobject.h:33
EDL Factory Interface allows one part of the EDL infrastructure to register class creation methods id...
Definition iedlfactory.h:31
IEDLObject is an abstract base class that is used by all classes that are intended to be created via ...
Definition iedlobject.h:53
virtual const CClassID & getClassID() const =0
Returns class ID of IEDLObject.
virtual bool clone(IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory)
Create a copy of EDLObject.
Definition iedlobject.h:82
virtual bool init(CClassParams *pData)
The init() method is called to perform any post-construction initialization of an IEDLObject that has...
Definition iedlobject.h:70
Base class Interface for all Reference Counted objects.
Definition ircobject.h:35
EDL_API void throwEDLError(uint32 errorcode)
Utility - Throw an IEDLError exception with the given error code.
#define _BEGIN_EDL_NAMESPACE
Definition edlnamespaces.h:75
#define _END_EDL_NAMESPACE
Definition edlnamespaces.h:76
EDL "standard" types including known bit-length signed and unsigned integer type[def]s and definition...
#define UNREFERENCED_PARAMETER(P)
Definition edltypes.h:71
@ EDL_ERR_UNDEFINED
Undefined error.
Definition edlerrors.h:28
CSmartPtr< Type > edl_cast(Type *dst, IEDLObjectPtr src)
Definition iedlobject.h:91
CSmartPtr< Type > clone(const CSmartPtr< Type > &src, IEDLClassFactory *pFactory)
Convenience template to clone a node, returning a reference to the clone using the original type....
Definition iedlobject.h:109
Interface for Reference Counted Object.
An object class ID is a 128-bit globally unique ID (i.e. a GUID). In EDL it is abstracted within a CC...
EDL smart pointers which, in conjunction with the IRCOject class, provide reference-counted and autom...
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211
#define CSmartPtr
Definition smartptr.h:215