Lines Matching refs:success
80 LETableReference(const LEFontInstance* font, LETag tableTag, LEErrorCode &success) :
82 loadTable(success);
86 LETableReference(const LETableReference &parent, LEErrorCode &success) : fFont(parent.fFont), fTag(parent.fTag), fParent(&parent), fStart(parent.fStart), fLength(parent.fLength) {
87 if(LE_FAILURE(success)) {
154 void addOffset(size_t offset, LEErrorCode &success) {
158 success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
167 size_t ptrToOffset(const void *atPtr, LEErrorCode &success) const {
169 if(LE_FAILURE(success)) return LE_UINTPTR_MAX;
173 success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
193 size_t verifyLength(size_t offset, size_t length, LEErrorCode &success) {
195 LE_SUCCESS(success) &&
199 success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
229 void loadTable(LEErrorCode &success) {
230 if(LE_SUCCESS(success)) {
290 LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, size_t offset, le_uint32 count)
291 : LETableReference(parent, offset, LE_UINTPTR_MAX, success), fCount(count) {
293 if(LE_SUCCESS(success)) {
297 LETableReference::verifyLength(0, LETableVarSizer<T>::getSize()*count, success);
299 if(LE_FAILURE(success)) {
305 LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, le_uint32 count)
306 : LETableReference(parent, parent.ptrToOffset(array, success), LE_UINTPTR_MAX, success), fCount(count) {
308 if(LE_SUCCESS(success)) {
312 LETableReference::verifyLength(0, LETableVarSizer<T>::getSize()*count, success);
314 if(LE_FAILURE(success)) clear();
316 LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, size_t offset, le_uint32 count)
317 : LETableReference(parent, parent.ptrToOffset(array, success)+offset, LE_UINTPTR_MAX, success), fCount(count) {
319 if(LE_SUCCESS(success)) {
323 LETableReference::verifyLength(0, LETableVarSizer<T>::getSize()*count, success);
325 if(LE_FAILURE(success)) clear();
334 const T *getAlias(le_uint32 i, LEErrorCode &success) const {
335 return ((const T*)(((const char*)getAlias())+getOffsetFor(i, success)));
340 const T& getObject(le_uint32 i, LEErrorCode &success) const {
341 return *getAlias(i,success);
344 const T& operator()(le_uint32 i, LEErrorCode &success) const {
345 return *getAlias(i,success);
348 size_t getOffsetFor(le_uint32 i, LEErrorCode &success) const {
349 if(LE_SUCCESS(success)&&i<getCount()) {
352 success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
362 LEReferenceToArrayOf(const LETableReference& parent, LEErrorCode & success) : LETableReference(parent,0, LE_UINTPTR_MAX, success), fCount(0) {
377 * @param success error status
380 LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr)
381 : LETableReference(parent, parent.ptrToOffset(atPtr, success), LE_UINTPTR_MAX, success) {
382 verifyLength(0, LETableVarSizer<T>::getSize(), success);
383 if(LE_FAILURE(success)) clear();
388 LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr, size_t offset)
389 : LETableReference(parent, parent.ptrToOffset(atPtr, success)+offset, LE_UINTPTR_MAX, success) {
390 verifyLength(0, LETableVarSizer<T>::getSize(), success);
391 if(LE_FAILURE(success)) clear();
393 LEReferenceTo(const LETableReference &parent, LEErrorCode &success, size_t offset)
394 : LETableReference(parent, offset, LE_UINTPTR_MAX, success) {
395 verifyLength(0, LETableVarSizer<T>::getSize(), success);
396 if(LE_FAILURE(success)) clear();
398 LEReferenceTo(const LETableReference &parent, LEErrorCode &success)
399 : LETableReference(parent, 0, LE_UINTPTR_MAX, success) {
400 verifyLength(0, LETableVarSizer<T>::getSize(), success);
401 if(LE_FAILURE(success)) clear();
403 LEReferenceTo(const LEFontInstance *font, LETag tableTag, LEErrorCode &success)
404 : LETableReference(font, tableTag, success) {
405 verifyLength(0, LETableVarSizer<T>::getSize(), success);
406 if(LE_FAILURE(success)) clear();
424 * same as addOffset(LETableVarSizer<T>::getSize(),success)
426 void addObject(LEErrorCode &success) {
427 addOffset(LETableVarSizer<T>::getSize(), success);
429 void addObject(size_t count, LEErrorCode &success) {
430 addOffset(LETableVarSizer<T>::getSize()*count, success);