Home
last modified time | relevance | path

Searched refs:MARISA_THROW_IF (Results 1 – 21 of 21) sorted by relevance

/external/marisa-trie/lib/marisa/
Dtrie.cc14 MARISA_THROW_IF(temp.get() == NULL, MARISA_MEMORY_ERROR); in build()
21 MARISA_THROW_IF(filename == NULL, MARISA_NULL_ERROR); in mmap()
24 MARISA_THROW_IF(temp.get() == NULL, MARISA_MEMORY_ERROR); in mmap()
33 MARISA_THROW_IF((ptr == NULL) && (size != 0), MARISA_NULL_ERROR); in map()
36 MARISA_THROW_IF(temp.get() == NULL, MARISA_MEMORY_ERROR); in map()
45 MARISA_THROW_IF(filename == NULL, MARISA_NULL_ERROR); in load()
48 MARISA_THROW_IF(temp.get() == NULL, MARISA_MEMORY_ERROR); in load()
57 MARISA_THROW_IF(fd == -1, MARISA_CODE_ERROR); in read()
60 MARISA_THROW_IF(temp.get() == NULL, MARISA_MEMORY_ERROR); in read()
69 MARISA_THROW_IF(trie_.get() == NULL, MARISA_STATE_ERROR); in save()
[all …]
Dkeyset.cc50 MARISA_THROW_IF(str == NULL, MARISA_NULL_ERROR); in push_back()
61 MARISA_THROW_IF((ptr == NULL) && (length != 0), MARISA_NULL_ERROR); in push_back()
62 MARISA_THROW_IF(length > MARISA_UINT32_MAX, MARISA_SIZE_ERROR); in push_back()
129 MARISA_THROW_IF(new_blocks.get() == NULL, MARISA_MEMORY_ERROR); in append_base_block()
138 MARISA_THROW_IF(new_block.get() == NULL, MARISA_MEMORY_ERROR); in append_base_block()
151 MARISA_THROW_IF(new_blocks.get() == NULL, MARISA_MEMORY_ERROR); in append_extra_block()
159 MARISA_THROW_IF(new_block.get() == NULL, MARISA_MEMORY_ERROR); in append_extra_block()
169 MARISA_THROW_IF(new_blocks.get() == NULL, MARISA_MEMORY_ERROR); in append_key_block()
177 MARISA_THROW_IF(new_block.get() == NULL, MARISA_MEMORY_ERROR); in append_key_block()
Dagent.cc13 MARISA_THROW_IF(str == NULL, MARISA_NULL_ERROR); in set_query()
21 MARISA_THROW_IF((ptr == NULL) && (length != 0), MARISA_NULL_ERROR); in set_query()
36 MARISA_THROW_IF(state_.get() != NULL, MARISA_STATE_ERROR); in init_state()
38 MARISA_THROW_IF(state_.get() == NULL, MARISA_MEMORY_ERROR); in init_state()
/external/marisa-trie/lib/marisa/grimoire/io/
Dmapper.cc55 MARISA_THROW_IF(filename == NULL, MARISA_NULL_ERROR); in open()
63 MARISA_THROW_IF((ptr == NULL) && (size != 0), MARISA_NULL_ERROR); in open()
71 MARISA_THROW_IF(!is_open(), MARISA_STATE_ERROR); in seek()
72 MARISA_THROW_IF(size > avail_, MARISA_IO_ERROR); in seek()
99 MARISA_THROW_IF(!is_open(), MARISA_STATE_ERROR); in map_data()
100 MARISA_THROW_IF(size > avail_, MARISA_IO_ERROR); in map_data()
117 MARISA_THROW_IF(::_stat64(filename, &st) != 0, MARISA_IO_ERROR); in open_()
120 MARISA_THROW_IF(::_stat(filename, &st) != 0, MARISA_IO_ERROR); in open_()
122 MARISA_THROW_IF((UInt64)st.st_size > MARISA_SIZE_MAX, MARISA_SIZE_ERROR); in open_()
127 MARISA_THROW_IF(file_ == INVALID_HANDLE_VALUE, MARISA_IO_ERROR); in open_()
[all …]
Dwriter.cc27 MARISA_THROW_IF(filename == NULL, MARISA_NULL_ERROR); in open()
35 MARISA_THROW_IF(file == NULL, MARISA_NULL_ERROR); in open()
43 MARISA_THROW_IF(fd == -1, MARISA_CODE_ERROR); in open()
68 MARISA_THROW_IF(!is_open(), MARISA_STATE_ERROR); in seek()
91 MARISA_THROW_IF(::fopen_s(&file, filename, "wb") != 0, MARISA_IO_ERROR); in open_()
94 MARISA_THROW_IF(file == NULL, MARISA_IO_ERROR); in open_()
113 MARISA_THROW_IF(!is_open(), MARISA_STATE_ERROR); in write_data()
129 MARISA_THROW_IF(size_written <= 0, MARISA_IO_ERROR); in write_data()
134 MARISA_THROW_IF(::fwrite(data, 1, size, file_) != size, MARISA_IO_ERROR); in write_data()
135 MARISA_THROW_IF(::fflush(file_) != 0, MARISA_IO_ERROR); in write_data()
[all …]
Dreader.cc27 MARISA_THROW_IF(filename == NULL, MARISA_NULL_ERROR); in open()
35 MARISA_THROW_IF(file == NULL, MARISA_NULL_ERROR); in open()
43 MARISA_THROW_IF(fd == -1, MARISA_CODE_ERROR); in open()
68 MARISA_THROW_IF(!is_open(), MARISA_STATE_ERROR); in seek()
91 MARISA_THROW_IF(::fopen_s(&file, filename, "rb") != 0, MARISA_IO_ERROR); in open_()
94 MARISA_THROW_IF(file == NULL, MARISA_IO_ERROR); in open_()
113 MARISA_THROW_IF(!is_open(), MARISA_STATE_ERROR); in read_data()
129 MARISA_THROW_IF(size_read <= 0, MARISA_IO_ERROR); in read_data()
134 MARISA_THROW_IF(::fread(buf, 1, size, file_) != size, MARISA_IO_ERROR); in read_data()
137 MARISA_THROW_IF(!stream_->read(static_cast<char *>(buf), in read_data()
Dreader.h25 MARISA_THROW_IF(obj == NULL, MARISA_NULL_ERROR); in read()
31 MARISA_THROW_IF((objs == NULL) && (num_objs != 0), MARISA_NULL_ERROR); in read()
32 MARISA_THROW_IF(num_objs > (MARISA_SIZE_MAX / sizeof(T)), in read()
Dmapper.h22 MARISA_THROW_IF(obj == NULL, MARISA_NULL_ERROR); in map()
28 MARISA_THROW_IF((objs == NULL) && (num_objs != 0), MARISA_NULL_ERROR); in map()
29 MARISA_THROW_IF(num_objs > (MARISA_SIZE_MAX / sizeof(T)), in map()
Dwriter.h30 MARISA_THROW_IF((objs == NULL) && (num_objs != 0), MARISA_NULL_ERROR); in write()
31 MARISA_THROW_IF(num_objs > (MARISA_SIZE_MAX / sizeof(T)), in write()
/external/marisa-trie/lib/marisa/grimoire/vector/
Dvector.h100 MARISA_THROW_IF(fixed_, MARISA_STATE_ERROR); in shrink()
107 MARISA_THROW_IF(fixed_, MARISA_STATE_ERROR); in fix()
201 MARISA_THROW_IF(total_size > MARISA_SIZE_MAX, MARISA_SIZE_ERROR); in map_()
202 MARISA_THROW_IF((total_size % sizeof(T)) != 0, MARISA_FORMAT_ERROR); in map_()
212 MARISA_THROW_IF(total_size > MARISA_SIZE_MAX, MARISA_SIZE_ERROR); in read_()
213 MARISA_THROW_IF((total_size % sizeof(T)) != 0, MARISA_FORMAT_ERROR); in read_()
Dflat-vector.h134 MARISA_THROW_IF(temp_value_size > 32, MARISA_FORMAT_ERROR); in map_()
145 MARISA_THROW_IF(temp_size > MARISA_SIZE_MAX, MARISA_SIZE_ERROR); in map_()
155 MARISA_THROW_IF(temp_value_size > 32, MARISA_FORMAT_ERROR); in read_()
166 MARISA_THROW_IF(temp_size > MARISA_SIZE_MAX, MARISA_SIZE_ERROR); in read_()
Dbit-vector.h52 MARISA_THROW_IF(size_ == MARISA_UINT32_MAX, MARISA_SIZE_ERROR); in push_back()
135 MARISA_THROW_IF(temp_num_1s > size_, MARISA_FORMAT_ERROR); in map_()
153 MARISA_THROW_IF(temp_num_1s > size_, MARISA_FORMAT_ERROR); in read_()
/external/marisa-trie/bindings/ruby/
Dmarisa-swig.cxx31 MARISA_THROW_IF(keyset_ == NULL, ::MARISA_MEMORY_ERROR); in Keyset()
86 MARISA_THROW_IF(agent_ == NULL, ::MARISA_MEMORY_ERROR); in Agent()
105 MARISA_THROW_IF(new_buf == NULL, MARISA_MEMORY_ERROR); in set_query()
145 MARISA_THROW_IF(trie_ == NULL, ::MARISA_MEMORY_ERROR); in Trie()
199 MARISA_THROW_IF(buf == NULL, MARISA_MEMORY_ERROR); in reverse_lookup()
/external/marisa-trie/bindings/perl/
Dmarisa-swig.cxx31 MARISA_THROW_IF(keyset_ == NULL, ::MARISA_MEMORY_ERROR); in Keyset()
86 MARISA_THROW_IF(agent_ == NULL, ::MARISA_MEMORY_ERROR); in Agent()
105 MARISA_THROW_IF(new_buf == NULL, MARISA_MEMORY_ERROR); in set_query()
145 MARISA_THROW_IF(trie_ == NULL, ::MARISA_MEMORY_ERROR); in Trie()
199 MARISA_THROW_IF(buf == NULL, MARISA_MEMORY_ERROR); in reverse_lookup()
/external/marisa-trie/bindings/
Dmarisa-swig.cxx31 MARISA_THROW_IF(keyset_ == NULL, ::MARISA_MEMORY_ERROR); in Keyset()
86 MARISA_THROW_IF(agent_ == NULL, ::MARISA_MEMORY_ERROR); in Agent()
105 MARISA_THROW_IF(new_buf == NULL, MARISA_MEMORY_ERROR); in set_query()
145 MARISA_THROW_IF(trie_ == NULL, ::MARISA_MEMORY_ERROR); in Trie()
199 MARISA_THROW_IF(buf == NULL, MARISA_MEMORY_ERROR); in reverse_lookup()
/external/marisa-trie/bindings/python/
Dmarisa-swig.cxx31 MARISA_THROW_IF(keyset_ == NULL, ::MARISA_MEMORY_ERROR); in Keyset()
86 MARISA_THROW_IF(agent_ == NULL, ::MARISA_MEMORY_ERROR); in Agent()
105 MARISA_THROW_IF(new_buf == NULL, MARISA_MEMORY_ERROR); in set_query()
145 MARISA_THROW_IF(trie_ == NULL, ::MARISA_MEMORY_ERROR); in Trie()
199 MARISA_THROW_IF(buf == NULL, MARISA_MEMORY_ERROR); in reverse_lookup()
/external/marisa-trie/lib/marisa/grimoire/trie/
Dheader.h21 MARISA_THROW_IF(!test_header(ptr), MARISA_FORMAT_ERROR); in map()
26 MARISA_THROW_IF(!test_header(buf), MARISA_FORMAT_ERROR); in read()
Dtail.cc13 MARISA_THROW_IF(offsets == NULL, MARISA_NULL_ERROR); in build()
170 MARISA_THROW_IF(current.length() == 0, MARISA_RANGE_ERROR); in build_()
192 MARISA_THROW_IF(buf_.size() > MARISA_UINT32_MAX, MARISA_SIZE_ERROR); in build_()
Dconfig.h58 MARISA_THROW_IF((config_flags & ~MARISA_CONFIG_MASK) != 0, in parse_()
Dlouds-trie.cc74 MARISA_THROW_IF(agent.query().id() >= size(), MARISA_BOUND_ERROR); in reverse_lookup()
453 MARISA_THROW_IF(next_trie_.get() == NULL, MARISA_MEMORY_ERROR); in build_next_trie()
470 MARISA_THROW_IF(next_trie_.get() == NULL, MARISA_MEMORY_ERROR); in build_next_trie()
544 MARISA_THROW_IF(next_trie_.get() == NULL, MARISA_MEMORY_ERROR); in map_()
570 MARISA_THROW_IF(next_trie_.get() == NULL, MARISA_MEMORY_ERROR); in read_()
/external/marisa-trie/include/marisa/
Dexception.h69 #define MARISA_THROW_IF(condition, error_code) \ macro
75 #define MARISA_DEBUG_IF(cond, error_code) MARISA_THROW_IF(cond, error_code)