diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-05-08 07:43:08 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-05-08 07:43:08 +0000 |
commit | a4000c3744e42fcbb638e742f3b63fa31a0dee15 (patch) | |
tree | 7f472c30e65bbfa04ee9bc06631a1af305cc31fb /indra/llrender | |
parent | 6c4cadbb04d633ad7b762058bdeba6e1f650dafd (diff) |
merge trunk@116587 skinning-7@119389 -> viewer-2.0.0-skinning-7
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llfontbitmapcache.cpp | 7 | ||||
-rw-r--r-- | indra/llrender/llfontbitmapcache.h | 7 | ||||
-rw-r--r-- | indra/llrender/llfontgl.cpp | 118 | ||||
-rw-r--r-- | indra/llrender/llfontgl.h | 47 | ||||
-rw-r--r-- | indra/llrender/llfontregistry.cpp | 19 | ||||
-rw-r--r-- | indra/llrender/llfontregistry.h | 13 | ||||
-rw-r--r-- | indra/llrender/llimagegl.h | 3 | ||||
-rw-r--r-- | indra/llrender/llrender.h | 2 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 1 | ||||
-rw-r--r-- | indra/llrender/llvertexbuffer.h | 1 |
10 files changed, 145 insertions, 73 deletions
diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp index f6321b0534..052510e6ed 100644 --- a/indra/llrender/llfontbitmapcache.cpp +++ b/indra/llrender/llfontbitmapcache.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2008&license=viewergpl$ * - * Copyright (c) 2008, Linden Research, Inc. + * Copyright (c) 2008-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,12 +12,13 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/indra/llrender/llfontbitmapcache.h b/indra/llrender/llfontbitmapcache.h index e5c09f8826..4beea0d026 100644 --- a/indra/llrender/llfontbitmapcache.h +++ b/indra/llrender/llfontbitmapcache.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2008&license=viewergpl$ * - * Copyright (c) 2008, Linden Research, Inc. + * Copyright (c) 2008-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -12,12 +12,13 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index beecb6b7c1..048bfe8e0d 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -32,16 +32,20 @@ #include "linden_common.h" -#include <boost/tokenizer.hpp> +#include "llfontgl.h" +// Linden library includes #include "llfont.h" -#include "llfontgl.h" #include "llfontbitmapcache.h" #include "llfontregistry.h" #include "llgl.h" +#include "llimagegl.h" #include "llrender.h" -#include "v4color.h" #include "llstl.h" +#include "v4color.h" + +// Third party library includes +#include <boost/tokenizer.hpp> const S32 BOLD_OFFSET = 1; @@ -102,14 +106,6 @@ U8 LLFontGL::getStyleFromString(const std::string &style) { ret |= UNDERLINE; } - if (style.find("SHADOW") != style.npos) - { - ret |= DROP_SHADOW; - } - if (style.find("SOFT_SHADOW") != style.npos) - { - ret |= DROP_SHADOW_SOFT; - } return ret; } @@ -215,11 +211,11 @@ bool findOrCreateFont(LLFontGL*& fontp, const LLFontDescriptor& desc) } // static -BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, +void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, - const std::vector<std::string>& xui_paths) + const std::vector<std::string>& xui_paths, + bool create_gl_textures) { - bool succ = true; sVertDPI = (F32)llfloor(screen_dpi * y_scale); sHorizDPI = (F32)llfloor(screen_dpi * x_scale); sScaleX = x_scale; @@ -229,24 +225,30 @@ BOOL LLFontGL::initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, // Font registry init if (!sFontRegistry) { - sFontRegistry = new LLFontRegistry(xui_paths); + sFontRegistry = new LLFontRegistry(xui_paths, create_gl_textures); sFontRegistry->parseFontInfo("fonts.xml"); } else { sFontRegistry->reset(); } +} - // Force standard fonts to get generated up front. - // This is primarily for error detection purposes. - succ &= (NULL != getFontSansSerifSmall()); - succ &= (NULL != getFontSansSerif()); - succ &= (NULL != getFontSansSerifBig()); - succ &= (NULL != getFontSansSerifHuge()); - succ &= (NULL != getFontSansSerifBold()); - succ &= (NULL != getFontMonospace()); +// Force standard fonts to get generated up front. +// This is primarily for error detection purposes. +// Don't do this during initClass because it can be slow and we want to get +// the viewer window on screen first. JC +// static +bool LLFontGL::loadDefaultFonts() +{ + bool succ = true; + succ &= (NULL != getFontSansSerifSmall()); + succ &= (NULL != getFontSansSerif()); + succ &= (NULL != getFontSansSerifBig()); + succ &= (NULL != getFontSansSerifHuge()); + succ &= (NULL != getFontSansSerifBold()); + succ &= (NULL != getFontMonospace()); succ &= (NULL != getFontExtChar()); - return succ; } @@ -341,6 +343,34 @@ LLFontGL* LLFontGL::getFont(const LLFontDescriptor& desc) return sFontRegistry->getFont(desc); } +//static +LLFontGL* LLFontGL::getFontByName(const std::string& name) +{ + // check for most common fonts first + if (name == "SANSSERIF") + { + return getFontSansSerif(); + } + else if (name == "SANSSERIF_SMALL") + { + return getFontSansSerifSmall(); + } + else if (name == "SANSSERIF_BIG") + { + return getFontSansSerifBig(); + } + else if (name == "SMALL" || name == "OCRA") + { + // *BUG: Should this be "MONOSPACE"? Do we use "OCRA" anymore? + // Does "SMALL" mean "SERIF"? + return getFontMonospace(); + } + else + { + return NULL; + } +} + BOOL LLFontGL::addChar(const llwchar wch) const { if (!LLFont::addChar(wch)) @@ -364,12 +394,13 @@ S32 LLFontGL::renderUTF8(const std::string &text, const S32 offset, const LLColor4 &color, const HAlign halign, const VAlign valign, U8 style, + ShadowType shadow, const S32 max_chars, const S32 max_pixels, F32* right_x, BOOL use_ellipses) const { LLWString wstr = utf8str_to_wstring(text); - return render(wstr, offset, x, y, color, halign, valign, style, max_chars, max_pixels, right_x, FALSE, use_ellipses); + return render(wstr, offset, x, y, color, halign, valign, style, shadow, max_chars, max_pixels, right_x, FALSE, use_ellipses); } S32 LLFontGL::render(const LLWString &wstr, @@ -378,6 +409,7 @@ S32 LLFontGL::render(const LLWString &wstr, const LLColor4 &color, const HAlign halign, const VAlign valign, U8 style, + ShadowType shadow, const S32 max_chars, S32 max_pixels, F32* right_x, BOOL use_embedded, @@ -401,14 +433,14 @@ S32 LLFontGL::render(const LLWString &wstr, style = style & (~getFontDesc().getStyle()); F32 drop_shadow_strength = 0.f; - if (style & (DROP_SHADOW | DROP_SHADOW_SOFT)) + if (shadow != NO_SHADOW) { F32 luminance; color.calcHSL(NULL, NULL, &luminance); drop_shadow_strength = clamp_rescale(luminance, 0.35f, 0.6f, 0.f, 1.f); if (luminance < 0.35f) { - style = style & ~(DROP_SHADOW | DROP_SHADOW_SOFT); + shadow = NO_SHADOW; } } @@ -547,7 +579,7 @@ S32 LLFontGL::render(const LLWString &wstr, LLRectf uv_rect(0.f, 1.f, 1.f, 0.f); LLRectf screen_rect(ext_x, ext_y + ext_height, ext_x + ext_width, ext_y); - drawGlyph(screen_rect, uv_rect, LLColor4::white, style, drop_shadow_strength); + drawGlyph(screen_rect, uv_rect, LLColor4::white, style, shadow, drop_shadow_strength); if (!label.empty()) { @@ -559,7 +591,7 @@ S32 LLFontGL::render(const LLWString &wstr, /*llfloor*/((ext_x + (F32)ext_image->getWidth() + EXT_X_BEARING) / sScaleX), /*llfloor*/(cur_y / sScaleY), color, - halign, BASELINE, NORMAL, S32_MAX, S32_MAX, NULL, + halign, BASELINE, NORMAL, NO_SHADOW, S32_MAX, S32_MAX, NULL, TRUE ); gGL.popMatrix(); } @@ -613,7 +645,7 @@ S32 LLFontGL::render(const LLWString &wstr, llround(cur_render_x + (F32)fgi->mXBearing) + (F32)fgi->mWidth, llround(cur_render_y + (F32)fgi->mYBearing) - (F32)fgi->mHeight); - drawGlyph(screen_rect, uv_rect, color, style, drop_shadow_strength); + drawGlyph(screen_rect, uv_rect, color, style, shadow, drop_shadow_strength); chars_drawn++; cur_x += fgi->mXAdvance; @@ -671,6 +703,7 @@ S32 LLFontGL::render(const LLWString &wstr, color, LEFT, valign, style, + shadow, S32_MAX, max_pixels, right_x, FALSE); @@ -838,13 +871,28 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch { if (iswspace(wch)) { - in_word = FALSE; + if(wch !=(0x00A0)) + { + in_word = FALSE; + } + } + if (iswindividual(wch)) + { + if (iswpunct(wchars[i+1])) + { + in_word=TRUE; + } + else + { + in_word=FALSE; + start_of_last_word = i; + } } } else { start_of_last_word = i; - if (!iswspace(wch)) + if (!iswspace(wch)||!iswindividual(wch)) { in_word = TRUE; } @@ -1108,7 +1156,7 @@ void LLFontGL::renderQuad(const LLRectf& screen_rect, const LLRectf& uv_rect, F3 llfont_round_y(screen_rect.mBottom)); } -void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4& color, U8 style, F32 drop_shadow_strength) const +void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4& color, U8 style, ShadowType shadow, F32 drop_shadow_strength) const { F32 slant_offset; slant_offset = ((style & ITALIC) ? ( -mAscender * 0.2f) : 0.f); @@ -1128,7 +1176,7 @@ void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, con renderQuad(screen_rect_offset, uv_rect, slant_offset); } } - else if (style & DROP_SHADOW_SOFT) + else if (shadow == DROP_SHADOW_SOFT) { LLColor4 shadow_color = LLFontGL::sShadowColor; shadow_color.mV[VALPHA] = color.mV[VALPHA] * drop_shadow_strength * DROP_SHADOW_SOFT_STRENGTH; @@ -1161,7 +1209,7 @@ void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, con gGL.color4fv(color.mV); renderQuad(screen_rect, uv_rect, slant_offset); } - else if (style & DROP_SHADOW) + else if (shadow == DROP_SHADOW) { LLColor4 shadow_color = LLFontGL::sShadowColor; shadow_color.mV[VALPHA] = color.mV[VALPHA] * drop_shadow_strength; diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 6cb1727ff4..204c6908af 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -34,16 +34,15 @@ #ifndef LL_LLFONTGL_H #define LL_LLFONTGL_H -#include "llfont.h" -#include "llimagegl.h" -#include "v2math.h" #include "llcoord.h" -#include "llrect.h" - +#include "llfont.h" #include "llfontregistry.h" +#include "llpointer.h" +#include "llrect.h" +#include "v2math.h" class LLColor4; - +class LLImageGL; // Key used to request a font. class LLFontDescriptor; @@ -73,12 +72,18 @@ public: enum StyleFlags { // text style to render. May be combined (these are bit flags) + // TODO:: Maybe change the value to 0x01 << 0 for 1 0x01 << 1 for 2, 0x01 << 2 for 4 NORMAL = 0, BOLD = 1, ITALIC = 2, - UNDERLINE = 4, - DROP_SHADOW = 8, - DROP_SHADOW_SOFT = 16 + UNDERLINE = 4 + }; + + enum ShadowType + { + NO_SHADOW, + DROP_SHADOW, + DROP_SHADOW_SOFT }; // Takes a string with potentially several flags, i.e. "NORMAL|BOLD|ITALIC" @@ -93,10 +98,14 @@ public: LLFontGL &operator=(const LLFontGL &source); - static BOOL initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, + static void initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, - const std::vector<std::string>& xui_paths); + const std::vector<std::string>& xui_paths, + bool create_gl_textures = true); + // Load sans-serif, sans-serif-small, etc. + // Slow, requires multiple seconds to load fonts. + static bool loadDefaultFonts(); static void destroyDefaultFonts(); static void destroyAllGL(); void destroyGL(); @@ -111,17 +120,17 @@ public: const LLColor4 &color) const { return renderUTF8(text, begin_offset, (F32)x, (F32)y, color, - LEFT, BASELINE, NORMAL, - S32_MAX, S32_MAX, NULL, FALSE); + LEFT, BASELINE, NORMAL, NO_SHADOW, + S32_MAX, S32_MAX, NULL, FALSE); } S32 renderUTF8(const std::string &text, const S32 begin_offset, S32 x, S32 y, const LLColor4 &color, - HAlign halign, VAlign valign, U8 style = NORMAL) const + HAlign halign, VAlign valign, U8 style = NORMAL, ShadowType shadow = NO_SHADOW) const { return renderUTF8(text, begin_offset, (F32)x, (F32)y, color, - halign, valign, style, + halign, valign, style, shadow, S32_MAX, S32_MAX, NULL, FALSE); } @@ -133,6 +142,7 @@ public: HAlign halign, VAlign valign, U8 style, + ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, @@ -143,7 +153,7 @@ public: const LLColor4 &color) const { return render(text, begin_offset, x, y, color, - LEFT, BASELINE, NORMAL, + LEFT, BASELINE, NORMAL, NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE, FALSE); } @@ -155,6 +165,7 @@ public: HAlign halign = LEFT, VAlign valign = BASELINE, U8 style = NORMAL, + ShadowType shadow = NO_SHADOW, S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX, F32* right_x=NULL, @@ -220,7 +231,7 @@ protected: F32 getEmbeddedCharAdvance(const embedded_data_t* ext_data) const; void clearEmbeddedChars(); void renderQuad(const LLRectf& screen_rect, const LLRectf& uv_rect, F32 slant_amt) const; - void drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4& color, U8 style, F32 drop_shadow_fade) const; + void drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4& color, U8 style, ShadowType shadow, F32 drop_shadow_fade) const; public: static F32 sVertDPI; @@ -238,6 +249,8 @@ public: static LLFontGL* getFontSansSerifBold(); static LLFontGL* getFontExtChar(); static LLFontGL* getFont(const LLFontDescriptor& desc); + // Use with legacy names like "SANSSERIF_SMALL" or "OCRA" + static LLFontGL* getFontByName(const std::string& name); static LLColor4 sShadowColor; diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 9b5bc5d0af..18e4a6915d 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2008&license=viewergpl$ * - * Copyright (c) 2008, Linden Research, Inc. + * Copyright (c) 2008-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -13,12 +13,13 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -167,7 +168,9 @@ LLFontDescriptor LLFontDescriptor::normalize() const return LLFontDescriptor(new_name,new_size,new_style,getFileNames()); } -LLFontRegistry::LLFontRegistry(const string_vec_t& xui_paths) +LLFontRegistry::LLFontRegistry(const string_vec_t& xui_paths, + bool create_gl_textures) +: mCreateGLTextures(create_gl_textures) { // Propagate this down from LLUICtrlFactory so LLRender doesn't // need an upstream dependency on LLUI. @@ -215,8 +218,8 @@ bool LLFontRegistry::parseFontInfo(const std::string& xml_filename) success = success || init_succ; } } - if (success) - dump(); + //if (success) + // dump(); return success; } @@ -426,7 +429,9 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) { LLFontGL *fontp = new LLFontGL; std::string font_path = local_path + *file_name_it; - BOOL is_fallback = !is_first_found; + // *HACK: Fallback fonts don't render, so we can use that to suppress + // creation of OpenGL textures for test apps. JC + BOOL is_fallback = !is_first_found || !mCreateGLTextures; F32 extra_scale = (is_fallback)?fallback_scale:1.0; if (!fontp->loadFace(font_path, extra_scale * point_size, LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback)) diff --git a/indra/llrender/llfontregistry.h b/indra/llrender/llfontregistry.h index ed775eeed0..198ca0b920 100644 --- a/indra/llrender/llfontregistry.h +++ b/indra/llrender/llfontregistry.h @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2008&license=viewergpl$ * - * Copyright (c) 2008, Linden Research, Inc. + * Copyright (c) 2008-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -13,12 +13,13 @@ * ("GPL"), unless you have obtained a separate licensing agreement * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlife.com/developers/opensource/gplv2 + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * * There are special exceptions to the terms and conditions of the GPL as * it is applied to this Source Code. View the full text of the exception * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at http://secondlife.com/developers/opensource/flossexception + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * * By copying, modifying or distributing this software, you acknowledge * that you have read and understood your obligations described above, @@ -70,7 +71,10 @@ private: class LLFontRegistry { public: - LLFontRegistry(const string_vec_t& xui_paths); + // create_gl_textures - set to false for test apps with no OpenGL window, + // such as llui_libtest + LLFontRegistry(const string_vec_t& xui_paths, + bool create_gl_textures); ~LLFontRegistry(); // Load standard font info from XML file(s). @@ -108,6 +112,7 @@ private: string_vec_t mUltimateFallbackList; string_vec_t mXUIPaths; + bool mCreateGLTextures; }; #endif // LL_LLFONTREGISTRY_H diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 4f737bcaae..53b0b70cae 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -37,7 +37,8 @@ #include "llimage.h" #include "llgltypes.h" -#include "llmemory.h" +#include "llpointer.h" +#include "llrefcount.h" #include "v2math.h" #include "llrender.h" diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index 437c715c2f..5b52fa1a52 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -44,7 +44,7 @@ #include "v3math.h" #include "v4coloru.h" #include "llstrider.h" -#include "llmemory.h" +#include "llpointer.h" #include "llglheaders.h" class LLVertexBuffer; diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 5d88ea464d..fc2a6954c3 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -37,7 +37,6 @@ #include "llvertexbuffer.h" // #include "llrender.h" #include "llglheaders.h" -#include "llmemory.h" #include "llmemtype.h" #include "llrender.h" diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h index aad948e17f..b785a22976 100644 --- a/indra/llrender/llvertexbuffer.h +++ b/indra/llrender/llvertexbuffer.h @@ -39,7 +39,6 @@ #include "v4math.h" #include "v4coloru.h" #include "llstrider.h" -#include "llmemory.h" #include "llrender.h" #include <set> #include <vector> |