sptk2 logo
SPTK Home Page
Public Member Functions | Public Attributes | List of all members
sptk::CPackedStrings Class Reference

Packed strings list. More...

#include <PackedStrings.h>

Public Member Functions

 CPackedStrings (int cnt, const char *strings[])
 
 CPackedStrings (FieldList &fields, int keyField)
 
 CPackedStrings (const Strings &strings)
 
 CPackedStrings (const CPackedStrings &other)=delete
 
 ~CPackedStrings ()
 
uint16_t size () const
 
const char * operator[] (uint16_t index) const
 
CPackedStringsoperator= (const CPackedStrings &)
 
CPackedStringsoperator= (const Strings &)
 
void user_data (void *d)
 
void * user_data () const
 
void argument (int32_t arg)
 
int32_t argument () const
 

Public Attributes

unsigned char height
 
unsigned char flags
 

Detailed Description

Packed strings list.

Special data structure to contain several strings packed into same memory block. The idea was to minimize the memory allocation, and decrease the total required memory. Also, contains special attributes for CListView row support.

Constructor & Destructor Documentation

◆ CPackedStrings() [1/4]

sptk::CPackedStrings::CPackedStrings ( int  cnt,
const char *  strings[] 
)

Constructor

Parameters
cntint, source strings count
stringsconst char *, source strings

◆ CPackedStrings() [2/4]

sptk::CPackedStrings::CPackedStrings ( FieldList fields,
int  keyField 
)

Constructor

Parameters
fieldsCFieldList, the fields data
keyFieldint, the key field number

◆ CPackedStrings() [3/4]

sptk::CPackedStrings::CPackedStrings ( const Strings strings)
explicit

Constructor

Parameters
stringsSource strings

◆ CPackedStrings() [4/4]

sptk::CPackedStrings::CPackedStrings ( const CPackedStrings other)
delete

Deleted copy constructor

Parameters
otherOther object

◆ ~CPackedStrings()

sptk::CPackedStrings::~CPackedStrings ( )

Destructor

Member Function Documentation

◆ argument() [1/2]

int32_t sptk::CPackedStrings::argument ( ) const
inline

Returns user_data as integer

◆ argument() [2/2]

void sptk::CPackedStrings::argument ( int32_t  arg)
inline

Sets user_data as integer

◆ operator=() [1/2]

CPackedStrings & sptk::CPackedStrings::operator= ( const CPackedStrings )

Assignment operator

◆ operator=() [2/2]

CPackedStrings & sptk::CPackedStrings::operator= ( const Strings )

Assignment operator

◆ operator[]()

const char * sptk::CPackedStrings::operator[] ( uint16_t  index) const

String access by index

◆ size()

uint16_t sptk::CPackedStrings::size ( ) const
inline

Strings count

◆ user_data() [1/2]

void * sptk::CPackedStrings::user_data ( ) const
inline

Returns user_data as void *

◆ user_data() [2/2]

void sptk::CPackedStrings::user_data ( void *  d)
inline

Sets user_data as void *

Member Data Documentation

◆ flags

unsigned char sptk::CPackedStrings::flags

Row flags for CListView

◆ height

unsigned char sptk::CPackedStrings::height

Row height for CListView


The documentation for this class was generated from the following file:

Fri Oct 14 2022 09:58:38: SPTK 5.4.1