property_hash.h
1 /*
2 ** ClanLib SDK
3 ** Copyright (c) 1997-2020 The ClanLib Team
4 **
5 ** This software is provided 'as-is', without any express or implied
6 ** warranty. In no event will the authors be held liable for any damages
7 ** arising from the use of this software.
8 **
9 ** Permission is granted to anyone to use this software for any purpose,
10 ** including commercial applications, and to alter it and redistribute it
11 ** freely, subject to the following restrictions:
12 **
13 ** 1. The origin of this software must not be misrepresented; you must not
14 ** claim that you wrote the original software. If you use this software
15 ** in a product, an acknowledgment in the product documentation would be
16 ** appreciated but is not required.
17 ** 2. Altered source versions must be plainly marked as such, and must not be
18 ** misrepresented as being the original software.
19 ** 3. This notice may not be removed or altered from any source distribution.
20 **
21 ** Note: Some of the libraries ClanLib may link to may have additional
22 ** requirements or restrictions.
23 **
24 ** File Author(s):
25 **
26 ** Magnus Norddahl
27 ** Mark Page
28 */
29 
30 #pragma once
31 
32 namespace clan
33 {
35  {
36  public:
37  PropertyHash(const char *property_name);
38  PropertyHash(const std::string &property_name) : PropertyHash(property_name.c_str()) {}
39 
40  PropertyHash &append_index(int value);
41  PropertyHash &append(const char *text);
42 
43  unsigned int hash;
44 
45  bool operator<(const PropertyHash &that) const { return hash < that.hash; }
46  bool operator<=(const PropertyHash &that) const { return hash <= that.hash; }
47  bool operator==(const PropertyHash &that) const { return hash == that.hash; }
48  bool operator!=(const PropertyHash &that) const { return hash != that.hash; }
49 
50  static const unsigned int scramble_value = 16777619U;
51 
163  };
164 }
static PropertyHash hash_border_image_outset_left
Definition: property_hash.h:72
static PropertyHash hash_visibility
Definition: property_hash.h:136
static PropertyHash hash_border_image_repeat_x
Definition: property_hash.h:75
Definition: clanapp.h:35
static PropertyHash hash_margin_top
Definition: property_hash.h:124
static PropertyHash hash_max_height
Definition: property_hash.h:125
static PropertyHash hash_line_height
Definition: property_hash.h:120
bool operator!=(const PropertyHash &that) const
Definition: property_hash.h:48
static PropertyHash hash_justify_content
Definition: property_hash.h:117
static PropertyHash hash_background_repeat_y
Definition: property_hash.h:63
static PropertyHash hash_border_top_right_radius_x
Definition: property_hash.h:92
static PropertyHash hash_font_size
Definition: property_hash.h:112
static PropertyHash hash_align_content
Definition: property_hash.h:52
static PropertyHash hash_border_image_slice_bottom
Definition: property_hash.h:77
bool operator<(const PropertyHash &that) const
Definition: property_hash.h:45
static PropertyHash hash_position
Definition: property_hash.h:133
static PropertyHash hash_box_shadow_blur_radius
Definition: property_hash.h:97
static PropertyHash hash_box_shadow_vertical_offset
Definition: property_hash.h:102
static PropertyHash hash_height
Definition: property_hash.h:116
static PropertyHash hash_border_image_slice_top
Definition: property_hash.h:81
static PropertyHash hash_border_bottom_right_radius_y
Definition: property_hash.h:69
static PropertyHash hash_text_decoration_overline
Definition: property_hash.h:157
static PropertyHash hash_padding_left
Definition: property_hash.h:130
static PropertyHash hash_flex_wrap
Definition: property_hash.h:108
static PropertyHash hash_color
Definition: property_hash.h:103
bool operator==(const PropertyHash &that) const
Definition: property_hash.h:47
static PropertyHash hash_margin_bottom
Definition: property_hash.h:121
static PropertyHash hash_box_shadow_spread_distance
Definition: property_hash.h:100
static PropertyHash hash_background_position
Definition: property_hash.h:138
static PropertyHash hash_border_image_outset_bottom
Definition: property_hash.h:71
static PropertyHash hash_letter_spacing
Definition: property_hash.h:149
static PropertyHash hash_flex_grow
Definition: property_hash.h:106
static PropertyHash hash_width
Definition: property_hash.h:137
static PropertyHash hash_min_width
Definition: property_hash.h:128
static PropertyHash hash_font_family_names
Definition: property_hash.h:109
static PropertyHash hash_border_image_slice_right
Definition: property_hash.h:80
static PropertyHash hash_flex_direction
Definition: property_hash.h:105
static PropertyHash hash_box_shadow
Definition: property_hash.h:147
static PropertyHash hash_right
Definition: property_hash.h:134
static PropertyHash hash_background_clip
Definition: property_hash.h:56
static PropertyHash hash_min_height
Definition: property_hash.h:127
static PropertyHash hash_border_image_slice_center
Definition: property_hash.h:78
static PropertyHash hash_layout
Definition: property_hash.h:118
static PropertyHash hash_text_decoration_line_through
Definition: property_hash.h:156
static PropertyHash hash_background_size_y
Definition: property_hash.h:65
static PropertyHash hash_font_style
Definition: property_hash.h:113
PropertyHash(const char *property_name)
static PropertyHash hash_text_decoration_underline
Definition: property_hash.h:158
static PropertyHash hash_background_attachment
Definition: property_hash.h:55
static PropertyHash hash_margin_left
Definition: property_hash.h:122
static PropertyHash hash_max_width
Definition: property_hash.h:126
static PropertyHash hash_box_shadow_color
Definition: property_hash.h:98
bool operator<=(const PropertyHash &that) const
Definition: property_hash.h:46
static PropertyHash hash_flex_shrink
Definition: property_hash.h:107
static PropertyHash hash_background_image
Definition: property_hash.h:58
static PropertyHash hash_border_right_style
Definition: property_hash.h:146
static PropertyHash hash_border_top_right_radius_y
Definition: property_hash.h:93
static PropertyHash hash_align_items
Definition: property_hash.h:53
static PropertyHash hash_border_bottom_width
Definition: property_hash.h:70
static PropertyHash hash_border_right_width
Definition: property_hash.h:88
static PropertyHash hash_background_repeat
Definition: property_hash.h:139
static const unsigned int scramble_value
Definition: property_hash.h:50
static PropertyHash hash_border_left_color
Definition: property_hash.h:143
static PropertyHash hash_border_bottom_left_radius_y
Definition: property_hash.h:67
static PropertyHash hash_padding_right
Definition: property_hash.h:131
static PropertyHash hash_box_shadow_style
Definition: property_hash.h:101
static PropertyHash hash_outline_style
Definition: property_hash.h:152
static PropertyHash hash_bottom
Definition: property_hash.h:96
PropertyHash & append_index(int value)
static PropertyHash hash_border_bottom_color
Definition: property_hash.h:141
static PropertyHash hash_border_right_color
Definition: property_hash.h:145
PropertyHash & append(const char *text)
static PropertyHash hash_text_transform
Definition: property_hash.h:160
static PropertyHash hash_word_spacing
Definition: property_hash.h:161
static PropertyHash hash_align_self
Definition: property_hash.h:54
static PropertyHash hash_top
Definition: property_hash.h:135
static PropertyHash hash_background_size_x
Definition: property_hash.h:64
static PropertyHash hash_border_image_width_top
Definition: property_hash.h:86
static PropertyHash hash_border_bottom_style
Definition: property_hash.h:142
static PropertyHash hash_border_top_left_radius_x
Definition: property_hash.h:90
static PropertyHash hash_left
Definition: property_hash.h:119
static PropertyHash hash_border_image_width_bottom
Definition: property_hash.h:83
static PropertyHash hash_font_weight
Definition: property_hash.h:115
static PropertyHash hash_border_image_slice_left
Definition: property_hash.h:79
static PropertyHash hash_text_align
Definition: property_hash.h:154
static PropertyHash hash_border_bottom_right_radius_x
Definition: property_hash.h:68
static PropertyHash hash_flex_basis
Definition: property_hash.h:104
static PropertyHash hash_text_indent
Definition: property_hash.h:159
static PropertyHash hash_background_position_x
Definition: property_hash.h:60
PropertyHash(const std::string &property_name)
Definition: property_hash.h:38
static PropertyHash hash_border_image_width_right
Definition: property_hash.h:85
static PropertyHash hash_font_variant
Definition: property_hash.h:114
static PropertyHash hash_border_top_color
Definition: property_hash.h:89
static PropertyHash hash_font_family_names_X0
Definition: property_hash.h:110
static PropertyHash hash_border_image_outset_top
Definition: property_hash.h:74
static PropertyHash hash_border_image_outset_right
Definition: property_hash.h:73
static PropertyHash hash_text_decoration_blink
Definition: property_hash.h:155
static PropertyHash hash_border_top_left_radius_y
Definition: property_hash.h:91
static PropertyHash hash_background_size
Definition: property_hash.h:140
static PropertyHash hash_border_left_style
Definition: property_hash.h:144
static PropertyHash hash_z_index
Definition: property_hash.h:162
static PropertyHash hash_border_top_style
Definition: property_hash.h:94
static PropertyHash hash_background_origin
Definition: property_hash.h:59
Definition: property_hash.h:34
static PropertyHash hash_padding_bottom
Definition: property_hash.h:129
static PropertyHash hash_order
Definition: property_hash.h:150
static PropertyHash hash_outline_color
Definition: property_hash.h:151
static PropertyHash hash_background_position_y
Definition: property_hash.h:61
static PropertyHash hash_padding_top
Definition: property_hash.h:132
static PropertyHash hash_background_repeat_x
Definition: property_hash.h:62
static PropertyHash hash_border_top_width
Definition: property_hash.h:95
static PropertyHash hash_border_image_source
Definition: property_hash.h:82
static PropertyHash hash_outline_width
Definition: property_hash.h:153
static PropertyHash hash__clan_font_rendering
Definition: property_hash.h:111
static PropertyHash hash_margin_right
Definition: property_hash.h:123
static PropertyHash hash_font_family
Definition: property_hash.h:148
static PropertyHash hash_border_left_width
Definition: property_hash.h:87
static PropertyHash hash_background_color
Definition: property_hash.h:57
static PropertyHash hash_border_bottom_left_radius_x
Definition: property_hash.h:66
static PropertyHash hash_border_image_repeat_y
Definition: property_hash.h:76
unsigned int hash
Definition: property_hash.h:43
static PropertyHash hash_border_image_width_left
Definition: property_hash.h:84
static PropertyHash hash_box_shadow_horizontal_offset
Definition: property_hash.h:99