summaryrefslogtreecommitdiff
path: root/glib/glibmm/ustring.h
Commit message (Collapse)AuthorAgeFilesLines
* C++11: Use = delete instead of private to make classes noncopyable.Murray Cumming2015-07-181-24/+30
|
* ustring.h: Comment On Last Commit for SpecializationChun-wei Fan2014-09-201-1/+2
| | | | | | | | | | | Mention that the new specialization for Stringify for const char[N] is to avoid ambiguous constructor overloads for later versions of Visual C++. * glib/glibmm/ustring.h: Mention in the comments for the specialization on Stringify for const char[N] is for later versions of Visual C++, to avoid ambiguous contructor overloads. https://bugzilla.gnome.org/show_bug.cgi?id=736778
* ustring.h: Add Specialization for Stringify<const char[N]>Chun-wei Fan2014-09-191-0/+18
| | | | | | | | | | | | This adds a specialization for string literals in the form of const char[N] as some compilers would take such things to have ambiguous constructor overloads, such as Visual Studio, which take string literals in this form. * glib/glibmm/ustring.h: Add a specialization for Stringify for const char[N] so that ambiguous constructor overloads can be avoided for string literals in this form. https://bugzilla.gnome.org/show_bug.cgi?id=736778
* Glib::ustring docs: Say more clearly that it must be only UTF-8Kjell Ahlstedt2014-03-051-1/+20
| | | | | | * glib/glibmm/ustring.h: Mention in the documentation of ustring and ustring_Iterator that bad things can happen if the string does not contain only valid UTF-8 data. Bug #681560.
* ustring docs: The global locale should be set when using C++ streams.Debarshi Ray2012-11-141-2/+2
| | | | | | * glib/glibmm/ustring.h: Replace output.imbue(std::locale("")) by std::locale::global(std::locale("")) in the description of how to use std::ostringstream. Bug #661588.
* Use std::size_t and std::ptrdiff_t.Kjell Ahlstedt2012-09-121-3/+3
| | | | | | | | | | | | | | | | | | * glib/glibmm/arrayhandle.h: * glib/glibmm/containers.h: * glib/glibmm/listhandle.h: * glib/glibmm/slisthandle.h: * glib/glibmm/vectorutils.h: Use std::size_t and std::ptrdiff_t instead of ::size_t and ::ptrdiff_t. Only the std versions are required to be declared in <cstddef>. * examples/network/resolver.cc: * glib/glibmm/containerhandle_shared.h: * glib/glibmm/helperlist.h: * glib/glibmm/main.h: * glib/glibmm/vectorutils.cc: Use std::size_t instead of ::size_t. * glib/src/convert.hg: Use std::size_t instead of ::size_t in a comment. * glib/glibmm/property.cc: * glib/glibmm/ustring.h: Use std::ptrdiff_t instead of ::ptrdiff_t.
* Bug #613250 - Overload Glib::ustring::FormatStream::stream for char *Debarshi Ray2010-03-261-10/+20
|
* Rename @since back to @newinDaniel Elstner2009-08-201-18/+18
| | | | | | | | | | | | * docs/reference/Doxyfile.in (ALIASES): Rename the @since alias back to its old name @newin, but otherwise keep the parameters. Apparently there is a @since command predefined in Doxygen which I hadn't noticed. It does seem to get overridden silently, but it is better not to rely on this. * tools/pm/DocsParser.pm (convert_tags_to_doxygen): Output @newin instead of @since. * {glib,gio}/src/*.hg, {glib,gio}/{glib,gio}mm/*.h: Replace all uses of @since with @newin.
* Implement parametric Doxygen alias @since{m,n}Daniel Elstner2009-08-181-18/+18
| | | | | | | | | | | | * docs/reference/Doxyfile.in (ALIASES): Define a parametrized alias @since{major,minor} to replace the old @newin?p?* aliases which had to be defined manually for every version number used. (PREDEFINED): Predefine G_GNUC_NORETURN, G_GNUC_NULL_TERMINATED and G_GNUC_PURE to the empty expansion. Remove GTKMM_* macros. * tools/pm/DocsParser.pm (convert_tags_to_doxygen): Change "Since:" substitution to output the new generic @since alias. * {glib,gio}/src/*.hg, {glib,gio}/{glib,gio}mm/*.h: Change all uses of @newin?p?* to @since{major,minor}.
* Get rid of all uses of GLIBMM_USING_STD()Daniel Elstner2009-08-161-14/+3
| | | | | | | | | | * glib/src/*.{ccg,hg}: Remove all uses of GLIBMM_USING_STD(). We definitely do not need this anymore, and probably never did. We never covered all symbols from namespace std anyway and never got any complaint about it. Also, be careful to always include the glibmmconfig.h header when it is needed. * glib/glibmm/*.{cc,h}: ditto. * glib/glibmmconfig.h.in: Clean up and re-indent.
* Allow comparison of const and non-const ustring iteratorsChris Vine2009-05-061-12/+12
| | | | | | | * glib/glibmm/ustring.h (ustring_Iterator<>): Turn the relational operators into non-templated functions, and rely on the implicit conversion of ustring::iterator to ustring::const_iterator. This makes the operators work with mixed argument types. (bgo #580773)
* Change license header to mention Lesser General Public License version 2.1Deng Xiyue2009-01-191-4/+4
| | | | | | | | | | 2009-01-20 Deng Xiyue <manphiz@gmail.com> * Change license header to mention Lesser General Public License version 2.1 instead of Library General Public License, to be consistent with COPYING. svn path=/trunk/; revision=779
* :compose): Add an overload which takes only a format string and noDaniel Elstner2009-01-081-0/+14
| | | | | | | | | * glib/glibmm/ustring.h (ustring::compose): Add an overload which takes only a format string and no arguments to be substituted. It is essentially a null-operation as long as the format string does not contain any invalid argument references. Bug #506394. svn path=/trunk/; revision=773
* Clean up glib includes (Bug #563987)Jonathon Jongsma2008-12-101-2/+1
| | | | svn path=/trunk/; revision=749
* Fixed the const char* specialization for Stringify<> by making the string_Armin Burgmeier2008-10-201-10/+7
| | | | | | | | | | | | | | | 2008-10-16 Armin Burgmeier <armin@openismus.com> * glib/glibmm/ustring.h: Fixed the const char* specialization for Stringify<> by making the string_ member a const Glib::ustring instead of a const Glib::ustring&. Also enabled the char[N] specialization for string literals. * tests/glibmm_ustring_compose/main.cc: Enabled the test for the specialization for string literals. Bug #506410 (Szilárd Pfeiffer) svn path=/trunk/; revision=741
* Added a test case. Added a ustring::Stringify<> template specialization soMurray Cumming2008-08-061-0/+45
| | | | | | | | | | | | | | | 2008-08-06 Murray Cumming <murrayc@murrayc.com> * configure.in: * tests/Makefile.am: * tests/glibmm_ustring_compose/main.cc: Added a test case. * glib/glibmm/ustring.h: Added a ustring::Stringify<> template specialization so that ustring::compose() works with const char* arguments, though it still needs to be fixed to work for string literals. Bug #506410 (Szilárd Pfeiffer). svn path=/trunk/; revision=711
* Whitespace correctionsMurray Cumming2008-08-061-3/+3
| | | | svn path=/trunk/; revision=710
* Whitespace correctionsMurray Cumming2008-08-061-51/+79
| | | | svn path=/trunk/; revision=709
* Added @newin2p16 to compose() and format() documentation.Murray Cumming2007-12-281-2/+58
| | | | | | | | | | | | 2007-12-28 Murray Cumming <murrayc@murrayc.com> * glib/glibmm/ustring.h: Added @newin2p16 to compose() and format() documentation. * glib/src/keyfile.ccg: * glib/src/keyfile.hg: set_double_list(): Make the ArrayHandle argument const. This could not have been used before. svn path=/trunk/; revision=481
* :FormatStream::FormatStream): Use the global C++ locale instead of forcingDaniel Elstner2007-09-031-25/+105
| | | | | | | | | | | | | | | | | | | | | * glib/glibmm/ustring.cc (ustring::FormatStream::FormatStream): Use the global C++ locale instead of forcing the environment's locale onto the formatting stream. This lifts an unnecessary restriction at the cost of requiring users to call std::locale::global(). * glib/glibmm/ustring.h (ustring): Advertise the new compose and format API in the class documentation. (ustring::format): Correct a couple of cut'n'paste mistakes -- ouch. Also add two more overloads so that format() now takes up to eight arguments. Extent the method documentation, too. (ustring::Stringify): Explicitly declare the class as noncopyable. (ustring::compose): Qualify calls to method ustring::compose_argv() in order to avoid surprising name lookup results in the context of the template instantiation. * docs/reference/Doxyfile.in (PREDEFINED): Add GLIBMM_HAVE_WIDESTREAM so that the wide stream I/O operators show up in the documentation. svn path=/trunk/; revision=441
* :compose_argv): Rename "format" argument to "fmt" to avoid name clashesDaniel Elstner2007-08-151-130/+250
| | | | | | | | | | | | | | | | | * glib/glibmm/ustring.{cc,h} (ustring::compose_argv): Rename "format" argument to "fmt" to avoid name clashes with the method of the same name. (ustring::compose): Make the type of each substitution parameter a template argument, and invoke ustring::format() implicitly for non-string arguments. Explicit invocation of ustring::format() is still necessary in order to apply I/O manipulators to an argument. (ustring::Stringify): New auxiliary template class used in the implementation of ustring::compose(). * examples/compose/main.cc (show_examples): Omit explicit calls to ustring::format() where possible. svn path=/trunk/; revision=437
* Add -I$(top_builddir) in order to allow <config.h> to be included.Daniel Elstner2007-08-121-20/+38
| | | | | | | | | | | | | | | | | | | * build_shared/Makefile_build.am_fragment (all_includes): Add -I$(top_builddir) in order to allow <config.h> to be included. * glib/glibmm/ustring.{cc,h}: Include <config.h> for the definition of SIZEOF_WCHAR_T. (ustring::FormatStream::stream): Replace accessor with template method that passes its argument onto the stream. Add overload for "const char*" to enable the use of UTF-8 string literals as arguments to ustring::format(). (ustring::FormatStream::FormatStream): Handle exceptions on failure to initialize the locale gracefully. (ustring::format): Adapt to the modified stream() method. (operator<<): Add missing call to ustring::raw() to get the number of bytes instead of code points. Oops. svn path=/trunk/; revision=433
* Add preliminary implementation of a message compose and format API (bugDaniel Elstner2007-08-121-1/+263
| | | | | | | | | | | | | | | | | | | * glib/glibmm/ustring.{cc,h}: Add preliminary implementation of a message compose and format API (bug #399216). The API design is not final and still open for discussion. (ustring::compose): New set of static methods for composing internationalized text messages by substituting placeholders in a template string. (ustring::format): New set of static methods for locale-dependent formatting of numbers and other streamable objects to strings. (ustring::compose_argv): New static method which implements the common functionality of the compose() overloads. (ustring::FormatStream): New helper class which implements the type-independent functionality of the format() templates. (operator>>): New operator overload for std::wistream. (operator<<): New operator overload for std::wostream. svn path=/trunk/; revision=432
* Clean up the code a bit. (get_application_name): Remove the code thatDaniel Elstner2007-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * glib/glibmm/miscutils.cc: Clean up the code a bit. (get_application_name): Remove the code that checked the string for valid UTF-8, and attempted conversion if not valid. I must have been on crack when I wrote this, as the combination of conditions that would cause the string to be invalid UTF-8 is quite unlikely. If this is a valid concern at all, it should be filed as a GLib bug and not worked around in glibmm. (build_filename(const std::string&, const std::string&)): Just call the plain g_build_filename() instead of building a temporary array and passing that via ArrayHandle to the build_filename() overload for containers. (build_path): Remove the already deactivated custom implementation from the time before g_build_pathv() was added to GLib. * glib/glibmm/object.{cc,h}: Improve/fix a couple of comments. (ConstructParams::ConstructParams): Add G_GNUC_NULL_TERMINATED function attribute to make the compiler complain if the variadic argument list is not terminated by a NULL pointer. * glib/glibmm/ustring.{cc,h} (utf8_find_last_of): Avoid applying bitwise logical operators directly to (possibly signed) operands of char type. In order to avoid relying on implementation-defined behavior, make sure that the operands are of unsigned integer type. (ustring::is_ascii): Likewise, (ustring_Iterator<T>::operator--): Likewise. (get_unichar_from_std_iterator): De-obfuscate this highly optimized piece of code, as the current stable release of GCC (4.1.2-pre on my system) generates better assembler output without the voodoo. svn path=/trunk/; revision=369
* ustring(const ustring& src, size_type i, size_type n=npos) andRalf Stephan2006-09-191-2/+2
| | | | | | | | | | | | 2006-09-19 Ralf Stephan <ralf@ark.in-berlin.de> * glib/glibmm/ustring.h: ustring(const ustring& src, size_type i, size_type n=npos) and ustring(const char* src, size_type n) constructors: In the reference documentation, mention explicitly that n is the number of _UTF-8_ characters, rather than ASCII characters (bytes).
* Tag npos with GLIBMM_API, in order to dllexport it on win32. Bug #332438.Cedric Gustin2006-02-271-2/+2
| | | | | | | 2006-02-27 Cedric Gustin <cedric.gustin@gmail.com> * glib/glibmm/ustring.h: Tag npos with GLIBMM_API, in order to dllexport it on win32. Bug #332438.
* fix a typo in the documenation for uppercase()Rob Page2006-02-071-1/+1
| | | | | | 2006-02-07 Rob Page <page.rob@gmail.com> * glib/glibmm/ustring.h: fix a typo in the documenation for uppercase()
* Added new compiler tests. 1. To see whether it allows use of non extern CMurray Cumming2005-01-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-01-21 Murray Cumming <murrayc@localhost.localdomain> * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added new compiler tests. 1. To see whether it allows use of non extern C functions as extern C callbacks, because the Tru64 compiler does not allow this, when using strict_ansi. We do not actually use this yet. 2. To see whether it allows us to define a template that uses an undefined type, even if we do not use it before defining the type. Tru64 does not allow this. That's probably correct. * glib/glibmm/container.h: #ifdef out a dynamic_cast that Tru64 does not allow, and which I can not think of a better place to put. See the comment in the code. * glib/glibmm/containerhandler_helpers.h: When the compiler does not alllow the GObject and GtkObject (dynamic_cast of) specializations here, then put them in glib/glibmm/object.h and gtkmm/gtk/src/object.hg instead.- needed by Tru64 compiler. * glib/glibmm/value.h, value_custom.[h|cc]: Conditionally moved the RefPtr Value specialization into object.h, as above. * glib/src/ optiongroup.ccg, spawn.ccg, thread.ccg: Make C callacks separate extern C. * glib/src/optiongroup.ccg: Do not use the StringArrayHandle, because the Tru64 compiler has problems with it - see comments in code. * glib/src/optionentry.hg: Remove the include of value.h, because it is not used and it causes a Tru64 compile error in optioncontext.cc because its templates are included before the types that the template uses. 2005-01-19 Murray Cumming <murrayc@murrayc.com> * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added a compiler test, because the IRIX MipsPro compiler does not allow the inline initialization of ustring::npos. * glib/glibmm/ustring.[h|cc]: When the compiler does not support the inline initialization of npos, initialize it in the .cc file. Declare partial specializations of the SequenceString inner class inside the class - needed by IRIX MipsPro compiler.
* Temporarily reverted some stuff. I will recommit some of it.Murray Cumming2005-01-211-2/+2
|
* I mean Tru64, not MipsProMurray Cumming2005-01-201-2/+2
|
* Added a compiler test, because the IRIX MipsPro compiler does not allowMurray Cumming2005-01-191-4/+26
| | | | | | | | | | | | 2005-01-19 Murray Cumming <murrayc@murrayc.com> * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added a compiler test, because the IRIX MipsPro compiler does not allow the inline initialization of ustring::npos. * glib/glibmm/ustring.[h|cc]: When the compiler does not support the inline initialization of npos, initialize it in the .cc file. Declare partial specializatoins of the SequenceString inner class inside the class - needed by MipsPro (IRIX) compiler..
* Deal with some doxygen warnings about undocumented parameters. AddedMurray Cumming2004-12-181-1/+21
| | | | | | | | | | 2004-12-19 Murray Cumming <murrayc@murrayc.com> * glib/src/date.hg, glib/glibmm/main.h, glib/glibmm/signalproxy_connectionnode.h: Deal with some doxygen warnings about undocumented parameters. * glib/glibmm/ustring.h: Added documentation for the size() and bytes() methods.
* Use /*! instead of /** to introduce doxygen comments in order to avoidDaniel Elstner2004-06-041-20/+20
| | | | | | | * glib/glibmm/ustring.h: Use /*! instead of /** to introduce doxygen comments in order to avoid cluttering the long method list of class Glib::ustring. Replace a few double quotes with &quot; to prevent doxygen from escaping the enclosed HTML entities.
* Globally apply some minor code cleanup and optimization tweaks.Daniel Elstner2004-05-261-14/+15
| | | | | | | | | | | | | | | * glib/glibmm/ustring.{cc,h}: Globally apply some minor code cleanup and optimization tweaks. (get_unichar_from_std_iterator): Replace implementation with a hand-optimized and profiled variant that has been lurking in my local tree for quite some time, thus should be well tested. Also add the G_GNUC_PURE() attribute. (operator+): Explicitely instantiate and return a temporary string, instead of accessing the reference ustring::operator+=() returns. This quite often allows the compiler to eliminate the additional copy constructor invocation.
* Documented the constructors, based on the libstdc++ documentation, to makeMurray Cumming2004-05-041-4/+47
| | | | | | | | 2004-05-04 Murray Cumming <murrayc@murrayc@murrayc.com> * glib/glibmm/ustring.h: Documented the constructors, based on the libstdc++ documentation, to make it clear that sizes are in characters rather than bytes.
* 2.4.0:Murray Cumming2004-04-111-1/+1
| | | | | | | | 2004-04-11 Murray Cumming <murrayc@murrayc.com> * tools/pm/WrapParser.pm, Output.pm, m4/signal.m4: Allow _WRAP_SIGNAL() to take an refreturn argument, so that Gtk::Widget::on_get_accessible() can do an extra ref before returning the Atk::Object.
* generate beautify_docs.pl from beautify_docs.pl.in, so it can have theMurray Cumming2003-12-221-0/+4
| | | | | | | | 2003-12-22 Murray Cumming <murrayc@usa.net> * docs/reference: generate beautify_docs.pl from beautify_docs.pl.in, so it can have the perl path in it. Install it, so other *mm modules can use it.
* GTKMM_ m4 tests and #defines are now prefixed with GLIBMM_Murray Cumming2003-01-221-14/+14
| | | | | | 2003-01-22 Murray Cumming <murrayc@usa.net> * GTKMM_ m4 tests and #defines are now prefixed with GLIBMM_
* Initial revisionMurray Cumming2003-01-071-0/+907