Mako 9.0.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
edlqname.h
Go to the documentation of this file.
1/*
2 * edlqname.h
3 *
4 * Copyright (C) 2007-2026 Hybrid Software Helix Ltd. All rights reserved.
5 */
6
11
12#ifndef EDLQNAME_H
13#define EDLQNAME_H
14
15#include <edl/edltypes.h>
16#include <edl/iedlobject.h>
17#include <edl/iedlenum.h>
18#include <edl/edlstring.h>
19#include <jawsmako/hashable.h>
20
22
29{
30#define IEDLNamespaceID 0xb836b26d, 0x2e4e45d2, 0x82aa6c63, 0x6ca45484
31public:
36 class Data : public CClassParams
37 {
38 public:
41 };
42
46 static const CClassID &classID()
47 {
48 static CClassID id(IEDLNamespaceID);
49 return id;
50 };
51
56 virtual bool getPrefix(EDLSysString &sPrefix) const = 0;
62 virtual bool setPrefix(const EDLSysString &sPrefix) = 0;
68 virtual bool getNamespace(EDLSysString &sNamespace) const = 0;
74 virtual bool setNamespace(const EDLSysString &sNamespace) = 0;
75};
77#define edlobj2IEDLNamespace(src) edl_cast((IEDLNamespace *)NULL, src)
78
81
82#define NamespaceSeparatorL ((wchar_t *) L":")
83#define NamespaceSeparator ":"
84
91{
92public:
97 {
98 m_ptrNamespace = IEDLNamespacePtr(NULL);
99 m_name = EDLString();
100 }
101
106 EDLQName(const EDLQName &another)
107 {
108 m_ptrNamespace = another.m_ptrNamespace;
109 m_name = another.m_name;
110 }
111
117 EDLQName(IEDLNamespacePtr ptrNamespace, const EDLString &name)
118 {
119 m_ptrNamespace = ptrNamespace;
120 m_name = name;
121 }
122
128 EDLQName(IEDLNamespacePtr ptrNamespace, const EDLSysString &name)
129 {
130 m_ptrNamespace = ptrNamespace;
131 m_name = EDLSysStringToEDLString(name);
132 }
133
138 void operator =(const EDLQName &another)
139 {
140 if (this != &another)
141 {
142 m_ptrNamespace = another.m_ptrNamespace;
143 m_name = another.m_name;
144 }
145 }
146
152 bool operator ==(const EDLQName &another) const
153 {
154 if (this != &another)
155 {
156
157 EDLSysString ns1, ns2;
158 if (m_ptrNamespace->getNamespace(ns1) && another.m_ptrNamespace->getNamespace(ns2))
159 return (ns1 == ns2) && (m_name == another.m_name);
160 else
161 return false;
162
163 }
164 else
165 return true;
166 }
167
172 IEDLNamespacePtr getNamespace() const
173 {
174 return m_ptrNamespace;
175 }
176
182 bool setNamespace(const IEDLNamespacePtr &ns)
183 {
184 m_ptrNamespace = ns;
185 return true;
186 }
187
193 {
194 return m_name;
195 }
196
202 bool setName(const EDLString &name)
203 {
204 m_name = name;
205 return true;
206 }
207
213 bool setName(const EDLSysString &sysname)
214 {
215 m_name = EDLSysStringToEDLString(sysname);
216 return true;
217 }
218
224 {
225 EDLString result(L"");
226 EDLSysString sPrefix;
227
228 if (m_ptrNamespace && m_ptrNamespace->getPrefix(sPrefix))
229 result = EDLSysStringToEDLString(sPrefix) + NamespaceSeparatorL + m_name;
230 else
231 result = m_name;
232 return result;
233 }
234
239 bool isEmpty ()
240 {
241 return m_name.empty ();
242 }
243
244#ifdef SWIG
245 %apply unsigned long long &OUTPUT { uint64 &hash };
246#endif
247 virtual void updateHash(uint64 &hash) const;
248#ifdef SWIG
249 %clear uint64 &hash;
250#endif
251
252private:
253 IEDLNamespacePtr m_ptrNamespace;
254 EDLString m_name;
255};
256
258
259#endif /* __EDLQNAME_H__ */
An object to represent a 128-bit globally unique ID.
Definition objclassid.h:29
EDL Object Interface.
Definition iedlobject.h:31
EDLQName(IEDLNamespacePtr ptrNamespace, const EDLString &name)
constructor of EDLQName
Definition edlqname.h:117
EDLString getName() const
Retrieves member name of EDLQName.
Definition edlqname.h:192
EDLQName()
Empty constructor of EDLQName.
Definition edlqname.h:96
EDLQName(IEDLNamespacePtr ptrNamespace, const EDLSysString &name)
constructor of EDLQName
Definition edlqname.h:128
bool setName(const EDLSysString &sysname)
Sets member name of EDLQName.
Definition edlqname.h:213
virtual void updateHash(uint64 &hash) const
Update the given hash to include the receiver.
IEDLNamespacePtr getNamespace() const
Retrieves namespace.
Definition edlqname.h:172
EDLQName(const EDLQName &another)
Copy constructor of EDLQName.
Definition edlqname.h:106
EDLString getNameWithPrefix() const
Returns EDLString that is combination of prefix and name (prefix:name)
Definition edlqname.h:223
bool setName(const EDLString &name)
Sets member name of EDLQName.
Definition edlqname.h:202
bool setNamespace(const IEDLNamespacePtr &ns)
Sets namespace.
Definition edlqname.h:182
bool isEmpty()
Returns a boolean that says where this QName was empty.
Definition edlqname.h:239
Initialization data.
Definition edlqname.h:37
EDLSysString prefix
Definition edlqname.h:39
EDLSysString nameSpace
Definition edlqname.h:40
Interface to EDL Namespace class.
Definition edlqname.h:29
static const CClassID & classID()
Retrieves class id of IEDLNamespace.
Definition edlqname.h:46
virtual bool setNamespace(const EDLSysString &sNamespace)=0
Sets the namespace.
virtual bool getNamespace(EDLSysString &sNamespace) const =0
Retrieves the namespace.
virtual bool getPrefix(EDLSysString &sPrefix) const =0
Retrieves the namespace prefix.
virtual bool setPrefix(const EDLSysString &sPrefix)=0
Sets the name space prefix.
IEDLObject is an abstract base class that is used by all classes that are intended to be created via ...
Definition iedlobject.h:53
Definition iedlenum.h:49
Simple interface to provide a consistent hashing method for Mako objects.
Definition hashable.h:25
virtual uint64 hash() const
Obtain a 64-bit hash of the receiving object.
Definition hashable.h:33
#define _BEGIN_EDL_NAMESPACE
Definition edlnamespaces.h:75
#define _END_EDL_NAMESPACE
Definition edlnamespaces.h:76
#define NamespaceSeparatorL
Definition edlqname.h:82
#define IEDLNamespaceID
Definition edlqname.h:30
IInputEnumRC< IEDLNamespacePtr > IEDLNamespaceCollectionEnum
Definition edlqname.h:79
EDLString and EDLSysString classes and associated EDL string manipulation functions.
std::string EDLSysString
Definition edlstring.h:158
std::wstring EDLString
Definition edlstring.h:165
EDL_API EDLString EDLSysStringToEDLString(const EDLSysString &edlSysString)
EDLSysStringToEDLString converts an EDLSysString (UTF8) to an EDLString (UTF16 or UTF32 depending on ...
EDL "standard" types including known bit-length signed and unsigned integer type[def]s and definition...
#define EDL_API
Definition edltypes.h:86
unsigned long long uint64
Definition edltypes.h:35
An abstract interface for an object that can be hashed.
EDL iterator template classes designed to allow iteration over the contents of a collection....
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211