File indexing completed on 2026-05-19 08:08:33
0001
0002
0003 #ifndef _CL_SYMBOL_H
0004 #define _CL_SYMBOL_H
0005
0006 #include "cln/string.h"
0007
0008 namespace cln {
0009
0010
0011
0012 struct cl_symbol : public cl_rcpointer {
0013 public:
0014
0015 operator cl_string () const;
0016
0017 cl_symbol (const cl_string&);
0018 cl_symbol (const cl_symbol&);
0019
0020 cl_symbol& operator= (const cl_symbol&);
0021
0022 cl_symbol (cl_private_thing p) : cl_rcpointer (p) {}
0023 public:
0024
0025 cl_symbol (struct hashuniq * null, const cl_string& s);
0026 };
0027 CL_DEFINE_COPY_CONSTRUCTOR2(cl_symbol,cl_rcpointer)
0028 CL_DEFINE_ASSIGNMENT_OPERATOR(cl_symbol,cl_symbol)
0029
0030
0031
0032 inline cl_symbol::operator cl_string () const
0033 {
0034 return cl_string(_as_cl_private_thing());
0035 }
0036
0037
0038 inline bool equal (const cl_symbol& s1, const cl_symbol& s2)
0039 {
0040 return (s1.pointer == s2.pointer);
0041 }
0042
0043
0044 extern uintptr_t hashcode (const cl_symbol& s);
0045
0046 }
0047
0048 #endif