Mako 9.1.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
iedlobject.h
Go to the documentation of this file.
1/*
2 * iedlobject.h
3 *
4 * Copyright (C) 2007-2026 Hybrid Software Helix Ltd. All rights reserved.
5 */
6
11
12#ifndef EDLOBJECT_H
13#define EDLOBJECT_H
14
15#include <edl/edltypes.h>
16#include <edl/smartptr.h>
17#include <edl/ircobject.h>
18#include <edl/objclassid.h>
19#include <edl/edlerrors.h>
20
22
31
33{
34public:
35 virtual ~CClassParams()
36 {}
37};
38
40class IEDLObject;
42
53
54class IEDLObject : public IRCObject
55{
56public:
57
62 virtual const CClassID &getClassID() const = 0;
63
72 virtual bool init(CClassParams *pData)
73 {
75 return false;
76 }
77
84 virtual bool clone(IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory)
85 {
88 return false;
89 }
90};
91
92template<class Type>
93CSmartPtr<Type> edl_cast(Type *, IEDLObjectPtr src)
94{
95 if (src)
96 return CSmartPtr<Type>((Type *)dynamic_cast<Type *>((IEDLObject *)src), true);
97 else
98 return CSmartPtr<Type>();
99};
100
101
109template <class Type>
111{
112 IEDLObjectPtr cloned;
113 if (!src || !pFactory || !src->clone(cloned, pFactory) || !cloned)
115 CSmartPtr<Type> result = edl_cast((Type*) NULL, cloned);
116 if (!result)
118 return result;
119}
120
122
123#endif /* EDLOBJECT_H */
An object to represent a 128-bit globally unique ID.
Definition objclassid.h:29
EDL Object Interface.
Definition iedlobject.h:33
virtual ~CClassParams()
Definition iedlobject.h:35
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:55
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:84
virtual bool init(CClassParams *pData)
The init() method is called to perform any post-construction initialization of an IEDLObject that has...
Definition iedlobject.h:72
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 EDL_UNREFERENCED_PARAMETER(P)
Definition edltypes.h:76
@ EDL_ERR_UNDEFINED
Undefined error.
Definition edlerrors.h:30
CSmartPtr< Type > edl_cast(Type *, IEDLObjectPtr src)
Definition iedlobject.h:93
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:110
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 IRCObject class, provide reference-counted and auto...
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211
#define CSmartPtr
Definition smartptr.h:222