Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  ICU4XBidiInfo.hpp   Sprache: C

 
#ifndef ICU4XBidiInfo_HPP
#define ICU4XBidiInfo_HPP
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <algorithm>
#include <memory>
#include <variant>
#include <optional>
#include "diplomat_runtime.hpp"

#include "ICU4XBidiInfo.h"

class ICU4XBidiParagraph;

/**
 * A destruction policy for using ICU4XBidiInfo with std::unique_ptr.
 */

struct ICU4XBidiInfoDeleter {
  void operator()(capi::ICU4XBidiInfo* l) const noexcept {
    capi::ICU4XBidiInfo_destroy(l);
  }
};

/**
 * An object containing bidi information for a given string, produced by `for_text()` on `ICU4XBidi`
 * 
 * See the [Rust documentation for `BidiInfo`](https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html) for more information.
 */

class ICU4XBidiInfo {
 public:

  /**
   * The number of paragraphs contained here
   */

  size_t paragraph_count() const;

  /**
   * Get the nth paragraph, returning `None` if out of bounds
   * 
   * Lifetimes: `this` must live at least as long as the output.
   */

  std::optional<ICU4XBidiParagraph> paragraph_at(size_t n) const;

  /**
   * The number of bytes in this full text
   */

  size_t size() const;

  /**
   * Get the BIDI level at a particular byte index in the full text.
   * This integer is conceptually a `unicode_bidi::Level`,
   * and can be further inspected using the static methods on ICU4XBidi.
   * 
   * Returns 0 (equivalent to `Level::ltr()`) on error
   */

  uint8_t level_at(size_t pos) const;
  inline const capi::ICU4XBidiInfo* AsFFI() const { return this->inner.get(); }
  inline capi::ICU4XBidiInfo* AsFFIMut() { return this->inner.get(); }
  inline explicit ICU4XBidiInfo(capi::ICU4XBidiInfo* i) : inner(i) {}
  ICU4XBidiInfo() = default;
  ICU4XBidiInfo(ICU4XBidiInfo&&) noexcept = default;
  ICU4XBidiInfo& operator=(ICU4XBidiInfo&& other) noexcept = default;
 private:
  std::unique_ptr<capi::ICU4XBidiInfo, ICU4XBidiInfoDeleter> inner;
};

#include "ICU4XBidiParagraph.hpp"

inline size_t ICU4XBidiInfo::paragraph_count() const {
  return capi::ICU4XBidiInfo_paragraph_count(this->inner.get());
}
inline std::optional<ICU4XBidiParagraph> ICU4XBidiInfo::paragraph_at(size_t n) const {
  auto diplomat_optional_raw_out_value = capi::ICU4XBidiInfo_paragraph_at(this->inner.get(), n);
  std::optional<ICU4XBidiParagraph> diplomat_optional_out_value;
  if (diplomat_optional_raw_out_value != nullptr) {
    diplomat_optional_out_value = ICU4XBidiParagraph(diplomat_optional_raw_out_value);
  } else {
    diplomat_optional_out_value = std::nullopt;
  }
  return diplomat_optional_out_value;
}
inline size_t ICU4XBidiInfo::size() const {
  return capi::ICU4XBidiInfo_size(this->inner.get());
}
inline uint8_t ICU4XBidiInfo::level_at(size_t pos) const {
  return capi::ICU4XBidiInfo_level_at(this->inner.get(), pos);
}
#endif

Messung V0.5
C=94 H=100 G=96

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge