|
void | setObject (Tcl_Obj *am_pObject) |
|
void | DupIfMust () |
|
void | NewIfMust () |
|
CTCLInterpreter * | AssertIfNotBound () |
|
◆ concat()
Concatente a rhs object that is assumed to be a list into this... see Tcl_ListObjAppendList for more information about this function. Note that if Tcl_ListObjAppendList returns an error, this is mapped to a CTCLException of the appropriate type.
- Parameters
-
rhs | : CTCLObject& The list of elements that will be concatted with *this. note that to avoid failure, both *this and rhs must be convertible to a valid list format. |
- Returns
- CTCLObject&
- Return values
-
- Exceptions
-
- Note
- *this must be bound to an interpreter.
◆ getListElements()
vector< CTCLObject > CTCLObject::getListElements |
( |
| ) |
|
Treating *this as a Tcl List, return its elements as a vector of objects. This is a wrapper for Tcl_ListObjGetElements().
- Returns
- vector<CTCLObject>
- Return values
-
- Exceptions
-
- Note
- *this must be convertible to a properly formatted Tcl list.
-
we require that the object be bound to an interpreter...although strictly speaking the Tcl lib does not require it.
◆ getRange()
CTCLObject CTCLObject::getRange |
( |
int |
first, |
|
|
int |
last |
|
) |
| |
Get a range of characters from the object. See Tcl_GetRange for the full semantics of this as all we will do is return an object constructed from the return value of Tcl_GetRange.
- Parameters
-
first | : int First character position to copy. |
last | : int Last character position (inclusive) to copy. |
- Returns
- CTCLObject
- Return values
-
A | CTCLObject that is constructed from the output of Tcl_GetRange. |
- Note
- This function will operate on the unicode representation of the string according to the Tcl_GetRange manpage.
◆ lindex()
Get the element of a list at the specified index. If the index is out of range, an empty element is returned.
- Parameters
-
index | : integer The element number in the list (numbered from 0). |
- Returns
- CTCLObject
- Return values
-
The | element returned or an empty object if index is not valid. |
- Exceptions
-
- Note
- We require that *this be bound to an interpreter
◆ llength()
int CTCLObject::llength |
( |
| ) |
|
Retrieve the length of the list this object represents.
- Returns
- int
- Return values
-
- Exceptions
-
CTCLException | if *this cannot be recast as an appropriately formatted list. |
- Note
- we require that *this be bound to an interpreter... somewhat more restrictive a requirement than Tcl_ListObjectLength.
◆ lreplace()
Replace a range of elements of this treated as a list with another set of objects treated as list elements.
- Parameters
-
first | : int First element of the set to replace. |
count | : int Number to replace. |
newElements | : vector<CTCLObject&> Elements to replace with. |
- Returns
- CTCLObject&
- Return values
-
- Exceptions
-
CTCLException | If *this cannot be converted to a valid list format. |
- Note
- *this must be bound.
Marshall the objv:
◆ operator+=()
CTCLObject & CTCLObject::operator+= |
( |
Tcl_Obj * |
item | ) |
|
operator+= This overload lappends an existing Tcl_Obj* to the list.
- Parameters
-
pObj | - Tcl_Obj* to append: |
- Returns
- CTCLobject& (*this).
◆ operator=() [1/2]
CTCLObject & CTCLObject::operator= |
( |
Tcl_Obj * |
rhs | ) |
|
Assign to *this from another object.
◆ operator=() [2/2]
CTCLObject & CTCLObject::operator= |
( |
Tcl_WideInt |
rhs | ) |
|
Assign from a wide int. Wide ints are at least uint64_t wide.
- Parameters
-
rhs | - source of assignment. |
- Returns
- CTCLObject& (*this).
◆ setList()
set the object to a list of elements. This is an object oriented wrapper for Tcl_SetListObj
- Parameters
-
elements | : vector<CTCLObject&> The elements that will be used to form this list. |
- Returns
- CTCLObject&
- Return values
-
The documentation for this class was generated from the following files:
- libtclplus/include/tclplus/TCLObject.h
- libtclplus/tclplus/TCLObject.cpp