1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: flags.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_DATA_FLAGS_HXX
32 #define INCLUDED_DATA_FLAGS_HXX
34 #include <sal/types.h>
38 //-----------------------------------------------------------------------------
41 //-----------------------------------------------------------------------------
42 // node type + value type selector - fits into a byte (bit 5 currently unassigned)
47 // Primitive Data Type is stored in bits 0-4 (bit 3 currently unused)
60 // sequence data types
63 value_invalid
= value_any
| flag_sequence
,
65 value_string_list
= value_string
| flag_sequence
,
66 value_boolean_list
= value_boolean
| flag_sequence
,
67 value_short_list
= value_short
| flag_sequence
,
68 value_int_list
= value_int
| flag_sequence
,
69 value_long_list
= value_long
| flag_sequence
,
70 value_double_list
= value_double
| flag_sequence
,
71 value_binary_list
= value_binary
| flag_sequence
,
73 mask_valuetype
= mask_basetype
| flag_sequence
, // 0x1F
75 // Node Type is stored in bits 6+7
77 mask_nodetype
= 0x03 << nodetype_shift_
, // 0xC0
79 // maybe we should use 0 for node type 'value'
80 // to make the complete type be the valuetype ?
81 nodetype_invalid
= 0x00,
83 nodetype_value
= 0x01 << nodetype_shift_
, // 0x40
84 nodetype_group
= 0x02 << nodetype_shift_
, // 0x80
85 nodetype_set
= 0x03 << nodetype_shift_
, // 0xC0
87 flag_innernode
= 0x02 << nodetype_shift_
, // 0x80
88 flag_setnode
= 0x01 << nodetype_shift_
// 0x40
92 //-----------------------------------------------------------------------------
104 valueAvailable
= 0x10, // only used for value nodes
105 defaultAvailable
= 0x20, // only used for value nodes
107 defaulted
= 0x40, // somewhat redundant with State
108 defaultable
= 0x80 // redundant with State (merged || defaulted)
111 //-----------------------------------------------------------------------------
112 // set element or tree state
117 merged
, // = 0, - result of merging defaults + changes
118 defaulted
, // = 1, - result of copying defaults unchanged
119 replaced
, // = 2, - result of copying new layer unchanged
120 added
, // = 3, - same as 'replaced', but it is known,
121 // that there is no corresponding default
123 mask_state
= 0x0F, // leaves bits 3+4 reserved for states
125 flag_mandatory
= 0x10, // marks this element as non-removable/replacable
126 flag_readonly
= 0x20, // marks this element as read-only
127 flag_default_avail
= 0x40, // marks this element as containing default values
128 flag_removable
= 0x80 // marks this element as removable
131 //-----------------------------------------------------------------------------
133 //-----------------------------------------------------------------------------
136 #endif // INCLUDED_DATA_FLAGS_HXX