polar-objc 5.44
An Objective-C runtime library
Loading...
Searching...
No Matches
polar-protocol-tree-node.h
1/* Internal API: protocol tree node type for polar-objc.
2 Copyright (C) 2022-2025 Michael Malicoat <[email protected]>
3
4 This file is part of polar-objc.
5
6 polar-objc is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
8
9 polar-objc is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
10 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11 details.
12
13 You should have received a copy of the GNU General Public License along with this program; see the file LICENSE. If
14 not, see <http://www.gnu.org/licenses/>.
15*/
16#ifndef POLAR_PROTOCOL_TREE_NODE_H
17#define POLAR_PROTOCOL_TREE_NODE_H
18// polar_protocol_tree_node ********************************************************************************************
19
22
24{
25 polar_btree_node_pointer_key data_inherited;
26};
27
32
33#define POLAR_TYPE_PROTOCOL_TREE_NODE ( polar_protocol_tree_node_get_type() )
34
35#define POLAR_PROTOCOL_TREE_NODE(inst) ( POLAR_INTERNAL_TYPE_CHECK_INSTANCE_CAST((inst), POLAR_TYPE_PROTOCOL_TREE_NODE, polar_protocol_tree_node) )
36#define POLAR_IS_PROTOCOL_TREE_NODE(inst) ( POLAR_INTERNAL_TYPE_CHECK_INSTANCE_TYPE((inst), POLAR_TYPE_PROTOCOL_TREE_NODE) )
37#define POLAR_PROTOCOL_TREE_NODE_CLASS(klass) ( POLAR_INTERNAL_TYPE_CHECK_CLASS_CAST((klass), POLAR_TYPE_PROTOCOL_TREE_NODE, polar_protocol_tree_node_class) )
38#define POLAR_IS_PROTOCOL_TREE_NODE_CLASS(klass) ( POLAR_INTERNAL_TYPE_CHECK_CLASS_TYPE((klass), POLAR_TYPE_PROTOCOL_TREE_NODE) )
39#define POLAR_PROTOCOL_TREE_NODE_GET_CLASS(inst) ( POLAR_INTERNAL_TYPE_INSTANCE_GET_CLASS((inst), POLAR_TYPE_PROTOCOL_TREE_NODE, polar_protocol_tree_node_class) )
40
41POLAR_FUNCTION_INTERNAL OBJC_FUNCTION_CONSTANT polar_internal_type
42polar_protocol_tree_node_get_type( void );
43
44static inline struct objc_protocol *
45polar_protocol_tree_node_get_protocol( polar_protocol_tree_node *self )
46{
47 assert( POLAR_IS_PROTOCOL_TREE_NODE(self) );
48
49 return (struct objc_protocol *)( ((polar_btree_node *)self)->node_key );
50}
51
52#endif // POLAR_PROTOCOL_TREE_NODE_H
Definition polar-btree-node-pointer-key.h:30
Definition polar-btree-node-pointer-key.h:25
Definition polar-btree-node.h:25
Definition polar-protocol-tree-node.h:29
Definition polar-protocol-tree-node.h:24