Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
edlqname.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 EDLQNAME_H
11#define EDLQNAME_H
12
13#include <edl/edltypes.h>
14#include <edl/iedlobject.h>
15#include <edl/iedlenum.h>
16#include <edl/edlstring.h>
17#include <jawsmako/hashable.h>
18
20
27{
28#define IEDLNamespaceID 0xb836b26d, 0x2e4e45d2, 0x82aa6c63, 0x6ca45484
29public:
34 class Data : public CClassParams
35 {
36 public:
39 };
40
44 static const CClassID &classID()
45 {
46 static CClassID id(IEDLNamespaceID);
47 return id;
48 };
49
54 virtual bool getPrefix(EDLSysString &sPrefix) const = 0;
60 virtual bool setPrefix(const EDLSysString &sPrefix) = 0;
66 virtual bool getNamespace(EDLSysString &sNamespace) const = 0;
72 virtual bool setNamespace(const EDLSysString &sNamespace) = 0;
73};
75#define edlobj2IEDLNamespace(src) edl_cast((IEDLNamespace *)NULL, src)
76
79
80#define NamespaceSeparatorL ((wchar_t *) L":")
81#define NamespaceSeparator ":"
82
89{
90public:
95 {
96 m_ptrNamespace = IEDLNamespacePtr(NULL);
97 m_name = EDLString();
98 }
99
104 EDLQName(const EDLQName &another)
105 {
106 m_ptrNamespace = another.m_ptrNamespace;
107 m_name = another.m_name;
108 }
109
115 EDLQName(IEDLNamespacePtr ptrNamespace, const EDLString &name)
116 {
117 m_ptrNamespace = ptrNamespace;
118 m_name = name;
119 }
120
126 EDLQName(IEDLNamespacePtr ptrNamespace, const EDLSysString &name)
127 {
128 m_ptrNamespace = ptrNamespace;
129 m_name = EDLSysStringToEDLString(name);
130 }
131
136 void operator =(const EDLQName &another)
137 {
138 if (this != &another)
139 {
140 m_ptrNamespace = another.m_ptrNamespace;
141 m_name = another.m_name;
142 }
143 }
144
150 bool operator ==(const EDLQName &another) const
151 {
152 if (this != &another)
153 {
154
155 EDLSysString ns1, ns2;
156 if (m_ptrNamespace->getNamespace(ns1) && another.m_ptrNamespace->getNamespace(ns2))
157 return (ns1 == ns2) && (m_name == another.m_name);
158 else
159 return false;
160
161 }
162 else
163 return true;
164 }
165
170 IEDLNamespacePtr getNamespace() const
171 {
172 return m_ptrNamespace;
173 }
174
180 bool setNamespace(const IEDLNamespacePtr &ns)
181 {
182 m_ptrNamespace = ns;
183 return true;
184 }
185
191 {
192 return m_name;
193 }
194
200 bool setName(const EDLString &name)
201 {
202 m_name = name;
203 return true;
204 }
205
211 bool setName(const EDLSysString &sysname)
212 {
213 m_name = EDLSysStringToEDLString(sysname);
214 return true;
215 }
216
222 {
223 EDLString result(L"");
224 EDLSysString sPrefix;
225
226 if (m_ptrNamespace && m_ptrNamespace->getPrefix(sPrefix))
227 result = EDLSysStringToEDLString(sPrefix) + NamespaceSeparatorL + m_name;
228 else
229 result = m_name;
230 return result;
231 }
232
237 bool isEmpty ()
238 {
239 return m_name.empty ();
240 }
241
242 virtual void updateHash(uint64 &hash) const;
243
244private:
245 IEDLNamespacePtr m_ptrNamespace;
246 EDLString m_name;
247};
248
250
251#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:115
EDLString getName() const
Retrieves member name of EDLQName.
Definition edlqname.h:190
EDLQName()
Empty constructor of EDLQName.
Definition edlqname.h:94
EDLQName(IEDLNamespacePtr ptrNamespace, const EDLSysString &name)
constructor of EDLQName
Definition edlqname.h:126
bool setName(const EDLSysString &sysname)
Sets member name of EDLQName.
Definition edlqname.h:211
virtual void updateHash(uint64 &hash) const
Update the given hash to include the receiver.
IEDLNamespacePtr getNamespace() const
Retrieves namespace.
Definition edlqname.h:170
EDLQName(const EDLQName &another)
Copy constructor of EDLQName.
Definition edlqname.h:104
EDLString getNameWithPrefix() const
Returns EDLString that is combination of prefix and name (prefix:name)
Definition edlqname.h:221
bool setName(const EDLString &name)
Sets member name of EDLQName.
Definition edlqname.h:200
bool setNamespace(const IEDLNamespacePtr &ns)
Sets namespace.
Definition edlqname.h:180
bool isEmpty()
Returns a boolean that says where this QName was empty.
Definition edlqname.h:237
Initialization data.
Definition edlqname.h:35
EDLSysString prefix
Definition edlqname.h:37
EDLSysString nameSpace
Definition edlqname.h:38
Interface to EDL Namespace class.
Definition edlqname.h:27
static const CClassID & classID()
Retrieves class id of IEDLNamespace.
Definition edlqname.h:44
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:80
#define IEDLNamespaceID
Definition edlqname.h:28
IInputEnumRC< IEDLNamespacePtr > IEDLNamespaceCollectionEnum
Definition edlqname.h:77
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