FRIBParallelanalysis  1.0
FrameworkforMPIParalleldataanalysisatFRIB
Public Member Functions | Protected Member Functions | List of all members
CTCLObject Class Reference
Inheritance diagram for CTCLObject:
Inheritance graph
[legend]
Collaboration diagram for CTCLObject:
Collaboration graph
[legend]

Public Member Functions

 CTCLObject (Tcl_Obj *am_pObject)
 
 CTCLObject (const CTCLObject &aCTCLObject)
 
CTCLObjectoperator= (const CTCLObject &aCTCLObject)
 
int operator== (const CTCLObject &aCTCLObject) const
 
Tcl_Obj * getObject ()
 
const Tcl_Obj * getObject () const
 
CTCLObjectoperator= (const std::string &rSource)
 
CTCLObjectoperator= (const char *pSource)
 
CTCLObjectoperator= (int nSource)
 
CTCLObjectoperator= (const CTCLList &rList)
 
CTCLObjectoperator= (double dSource)
 
CTCLObjectoperator= (Tcl_Obj *rhs)
 
CTCLObjectoperator= (Tcl_WideInt rhs)
 
 operator std::string ()
 
 operator int ()
 
 operator CTCLList ()
 
 operator double ()
 
CTCLObjectoperator+= (const CTCLObject &rObject)
 
CTCLObjectoperator+= (int nItem)
 
CTCLObjectoperator+= (const std::string &rItem)
 
CTCLObjectoperator+= (const char *pItem)
 
CTCLObjectoperator+= (double Item)
 
CTCLObjectoperator+= (Tcl_Obj *pObj)
 
CTCLObject clone ()
 
CTCLObject operator() ()
 
CTCLObject getRange (int first, int last)
 
CTCLObjectconcat (CTCLObject &rhs)
 
std::vector< CTCLObjectgetListElements ()
 
CTCLObjectsetList (std::vector< CTCLObject > elements)
 
int llength ()
 
CTCLObject lindex (int index)
 
CTCLObjectlreplace (int first, int count, std::vector< CTCLObject > newElements)
 
- Public Member Functions inherited from CTCLInterpreterObject
 CTCLInterpreterObject (CTCLInterpreter *pInterp)
 
 CTCLInterpreterObject (const CTCLInterpreterObject &aCTCLInterpreterObject)
 
CTCLInterpreterObjectoperator= (const CTCLInterpreterObject &aCTCLInterpreterObject)
 
int operator== (const CTCLInterpreterObject &aCTCLInterpreterObject) const
 
CTCLInterpretergetInterpreter () const
 
CTCLInterpreterBind (CTCLInterpreter &rBinding)
 
CTCLInterpreterBind (CTCLInterpreter *pBinding)
 

Protected Member Functions

void setObject (Tcl_Obj *am_pObject)
 
void DupIfMust ()
 
void NewIfMust ()
 
- Protected Member Functions inherited from CTCLInterpreterObject
CTCLInterpreterAssertIfNotBound ()
 

Member Function Documentation

◆ concat()

CTCLObject & CTCLObject::concat ( CTCLObject rhs)

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
*this
Exceptions
CTCLExceptionif Tcl_ListObjeAppendList returns an error.
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
elementsof *this.
Exceptions
CTCLExceptionif Tcl_ListObjGetElements returns an error.
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
ACTCLObject 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()

CTCLObject CTCLObject::lindex ( int  index)

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
Theelement returned or an empty object if index is not valid.
Exceptions
CTCLExceptionif *this cannot be recast as a list.
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
lengthof list
Exceptions
CTCLExceptionif *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()

CTCLObject & CTCLObject::lreplace ( int  first,
int  count,
std::vector< CTCLObject newElements 
)

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
*this
Exceptions
CTCLExceptionIf *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()

CTCLObject & CTCLObject::setList ( std::vector< CTCLObject elements)

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
*this

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