Loading...
Searching...
No Matches
LibThread::TxList Class Reference

## Public Member Functions

| TxList ()
virtual | ~TxList ()
int | put (size_t index, string &value)
int | get (size_t index, string &value)
long | size ()
Public Member Functions inherited from LibThread::Transactional
| Transactional ()
void | set_region (Region *region_init)
virtual | ~Transactional ()
Public Member Functions inherited from LibThread::SharedObject
| SharedObject ()
virtual | ~SharedObject ()
void | set_type (int type_init)
int | get_type ()
void | set_name (std::string &name_init)
void | set_name (const char *s)
std::string & | get_name ()
void | incref (int by=1)
long | decref ()
long | getref ()
virtual BOOLEAN | op2 (int op, leftv res, leftv a1, leftv a2)
virtual BOOLEAN | op3 (int op, leftv res, leftv a1, leftv a2, leftv a3)

## Private Attributes

vector< string > | entries

## Additional Inherited Members

Protected Member Functions inherited from LibThread::Transactional
int | tx_begin ()
void | tx_end ()

## Detailed Description

Definition at line 352 of file shared.cc.

## Constructor & Destructor Documentation

## TxList()

LibThread::TxList::TxList | ( |  | ) |

inline

Definition at line 356 of file shared.cc.

: Transactional(), entries() { }
LibThread::Transactional::Transactional
Transactional()
Definition shared.cc:301
LibThread::TxList::entries
vector< string > entries
Definition shared.cc:354

## ~TxList()

virtual LibThread::TxList::~TxList | ( |  | ) |

inline virtual

Definition at line 357 of file shared.cc.

{ }

## Member Function Documentation

## get()

int LibThread::TxList::get | ( | size_t | index,
|  | string & | value )

inline

Definition at line 372 of file shared.cc.

{
int result = 0;
if (!tx_begin()) return -1;
if (index >= 1 && index <= entries.size()) {
result = (entries[index-1].size() != 0);
if (result)
value = entries[index-1];
}
tx_end();
return result;
}
LibThread::Transactional::tx_end
void tx_end()
Definition shared.cc:296
LibThread::Transactional::tx_begin
int tx_begin()
Definition shared.cc:286
result
return result
Definition facAbsBiFact.cc:76
index
static int index(p_Length length, p_Ord ord)
Definition p_Procs_Impl.h:592

## put()

int LibThread::TxList::put | ( | size_t | index,
|  | string & | value )

inline

Definition at line 358 of file shared.cc.

{
int result = -1;
if (!tx_begin()) return -1;
if (index >= 1 && index <= entries.size()) {
entries[index-1] = value;
result = 1;
} else {
entries.resize(index+1);
entries[index-1] = value;
result = 0;
}
tx_end();
return result;
}

## size()

long LibThread::TxList::size | ( |  | ) |

inline

Definition at line 383 of file shared.cc.

{
long result;
if (!tx_begin()) return -1;
result = (long) entries.size();
tx_end();
return result;
}

## Field Documentation

## entries

vector<string> LibThread::TxList::entries

private

Definition at line 354 of file shared.cc.

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

- Singular/dyn_modules/systhreads/shared.cc