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


Quelle  ICU4XList.hpp   Sprache: C

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

#include "ICU4XList.h"

class ICU4XList;

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

struct ICU4XListDeleter {
  void operator()(capi::ICU4XList* l) const noexcept {
    capi::ICU4XList_destroy(l);
  }
};

/**
 * A list of strings
 */

class ICU4XList {
 public:

  /**
   * Create a new list of strings
   */

  static ICU4XList create();

  /**
   * Create a new list of strings with preallocated space to hold
   * at least `capacity` elements
   */

  static ICU4XList create_with_capacity(size_t capacity);

  /**
   * Push a string to the list
   * 
   * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according
   * to the WHATWG Encoding Standard.
   */

  void push(const std::string_view val);

  /**
   * The number of elements in this list
   */

  size_t len() const;

  /**
   * Whether this list is empty
   */

  bool is_empty() const;
  inline const capi::ICU4XList* AsFFI() const { return this->inner.get(); }
  inline capi::ICU4XList* AsFFIMut() { return this->inner.get(); }
  inline explicit ICU4XList(capi::ICU4XList* i) : inner(i) {}
  ICU4XList() = default;
  ICU4XList(ICU4XList&&) noexcept = default;
  ICU4XList& operator=(ICU4XList&& other) noexcept = default;
 private:
  std::unique_ptr<capi::ICU4XList, ICU4XListDeleter> inner;
};


inline ICU4XList ICU4XList::create() {
  return ICU4XList(capi::ICU4XList_create());
}
inline ICU4XList ICU4XList::create_with_capacity(size_t capacity) {
  return ICU4XList(capi::ICU4XList_create_with_capacity(capacity));
}
inline void ICU4XList::push(const std::string_view val) {
  capi::ICU4XList_push(this->inner.get(), val.data(), val.size());
}
inline size_t ICU4XList::len() const {
  return capi::ICU4XList_len(this->inner.get());
}
inline bool ICU4XList::is_empty() const {
  return capi::ICU4XList_is_empty(this->inner.get());
}
#endif

Messung V0.5
C=97 H=94 G=95

¤ Dauer der Verarbeitung: 0.10 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