xref: /aosp_15_r20/external/pdfium/core/fxcrt/css/cfx_cssoutputtextbuf.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2017 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_FXCRT_CSS_CFX_CSSOUTPUTTEXTBUF_H_
8 #define CORE_FXCRT_CSS_CFX_CSSOUTPUTTEXTBUF_H_
9 
10 #include "core/fxcrt/data_vector.h"
11 #include "core/fxcrt/widestring.h"
12 
13 class CFX_CSSOutputTextBuf {
14  public:
15   CFX_CSSOutputTextBuf();
16   ~CFX_CSSOutputTextBuf();
17 
Clear()18   void Clear() { m_Buffer.clear(); }
IsEmpty()19   bool IsEmpty() const { return m_Buffer.empty(); }
20   void AppendCharIfNotLeadingBlank(wchar_t wch);
21   WideStringView GetTrailingBlankTrimmedString() const;
22 
23  protected:
24   DataVector<wchar_t> m_Buffer;
25 };
26 
27 #endif  // CORE_FXCRT_CSS_CFX_CSSOUTPUTTEXTBUF_H_
28