Jive reference manual
Namespaces | Classes | Functions | Variables
jem Namespace Reference

This namespace contains the fundamental classes that are used in all other packages of Jem. More...

Namespaces

 gl
 This namespace contains classes and functions for building OpenGL-based graphics applications.
 
 hdf5
 This namespace exports classes for accessing HDF5 files.
 
 io
 This namespace contains classes and functions that provide support for input and output operations.
 
 mp
 This namespace provides support for building parallel message passing programs.
 
 mt
 This namespace provides support for building multi-threaded parallel programs.
 
 numeric
 This namespace provides support for developing numerical algorithms and applications.
 
 std
 This namespace provides support for using the standard library.
 
 util
 This namespace exports various container classes and an event framework.
 
 xml
 This namespace contains classes and functions dealing with XML documents.
 
 xutil
 This namespace exports extra utility classes and functions.
 

Classes

class  ArithmeticException
 
class  Array
 Implements a multi-dimensional array that supports slicing and array expressions. More...
 
class  Array< idx_t, 0, IndexExpr >
 
class  Array< T, N, ImagExpr< E > >
 
class  Array< T, N, RealExpr< E > >
 
class  ArrayExpr
 A dummy class representing array expressions. More...
 
class  ArrayIterator
 
class  AssertException
 
class  AttributeTable
 
class  AutoPointer
 
class  BasicString
 Helps the String class converting various types of strings. More...
 
class  Begin
 An empty class that facilitates the construction of slices. More...
 
class  Boolean
 
class  BoolType
 Provides support for writing meta-programs. More...
 
class  CancellationScope
 
class  CancelledException
 
class  Character
 
class  Class
 
class  ClassCastException
 
class  ClassRegisterAgent
 
class  ClassTable
 
class  ClassTableTraits
 
class  ClassTemplate
 
class  Clonable
 
class  Collectable
 Provides support for automatic garbage collection. More...
 
class  CompileTimeCheck
 Checks a boolean condition at compile-time. More...
 
class  Condition
 
class  Constructor
 
class  ConstructorTemplate
 
class  CString
 Converts a String object to a null-terminated character array. More...
 
class  DefaultConstructor
 
class  End
 An empty class that facilitates the construction of slices. More...
 
class  EnvParams
 
class  Error
 
class  Exception
 Provides a single superclass for all exceptions that a program should catch. More...
 
class  FastCondition
 
class  Field
 
class  FieldGetterTraits
 
class  FieldTemplate
 
class  Float
 
class  IllegalArgumentException
 
class  IllegalIndexException
 
class  IllegalInputException
 
class  IllegalOperationException
 
class  InstantiationException
 
class  Integer
 
class  Interface
 Provides support for creating Java-like interfaces. More...
 
class  Limits
 
class  Lock
 Locks and unlocks mutual exclusion objects. More...
 
class  Member
 
class  MemoryError
 
class  Method
 
class  MethodTemplate
 
class  MethodTraits
 
class  MethodTraitsBase
 
class  Monitor
 
class  Mutex
 
class  NamedObject
 
class  Nil
 Represents a null pointer. More...
 
class  NullPointerException
 
class  Number
 
class  Object
 Provides a single superclass for many classes in jem. More...
 
struct  Once
 
class  OutOfMemoryException
 
class  ParseException
 Signals a parse error. More...
 
class  PrecheckException
 
class  Process
 
class  RangeException
 
class  ReadLock
 
class  ReadWriteMutex
 
class  RecursiveMonitor
 
class  RecursiveMutex
 
class  Ref
 Provides `safe' access to a collectable object. More...
 
class  RuntimeException
 Signals a runtime exception. More...
 
class  SerialSection
 
class  SettableFieldTemplate
 
class  Signals
 
class  Slice
 Selects parts of array-like objects. More...
 
class  SliceAll
 A class for creating a contiguous slice that contains all elements of an array-like object. More...
 
class  SliceFrom
 A class for creating a contiguous slice that extends to the end of an array-like object. More...
 
class  SliceFromTo
 A class for creating contiguous slices of array-like objects. More...
 
class  SliceTo
 A class for creating a contiguous slice that starts at the beginning of an array-like object. More...
 
class  SpawnParams
 
class  String
 Encapsulates a character string. More...
 
class  StringBuffer
 
class  StringObject
 
class  System
 Provides access to the standard input and output streams, and other system facilities. More...
 
class  SystemException
 
class  Thread
 
class  Throwable
 Provides a single superclass for all exceptions in Jem. More...
 
class  Time
 
class  Tuple
 Encapsulates a fixed-size, two-dimensional array. More...
 
class  TupleExpr
 A dummy class representing tuple expressions. More...
 
class  WeakProxy
 
class  WeakRef
 Provides `safe' acces to a collectable object without preventing the deletion of that object. More...
 
class  WriteLock
 

Functions

template<class U , class T , int N, class E >
Array< U, N, UnaryExpr< StaticCast< U, T >, Array< T, N, E > > > castTo (const Array< T, N, E > &e)
 
template<class T , class U , int N, class E1 , class E2 , class E3 >
Array< typename PromoteTypes< T, U >::ResultType, N, WhereExpr< Array< bool, N, E1 >, Array< T, N, E2 >, Array< U, N, E3 > > > where (const Array< bool, N, E1 > &mask, const Array< T, N, E2 > &lhs, const Array< U, N, E3 > &rhs)
 
template<class T , class U , int N, class E1 , class E2 >
Array< typename PromoteTypes< T, U >::ResultType, N, WhereExpr< Array< bool, N, E1 >, Array< T, N, E2 >, ScalarExpr< U > > > where (const Array< bool, N, E1 > &mask, const Array< T, N, E2 > &lhs, const U &rhs)
 
template<class T , class U , int N, class E1 , class E2 >
Array< typename PromoteTypes< T, U >::ResultType, N, WhereExpr< Array< bool, N, E1 >, ScalarExpr< T >, Array< U, N, E2 > > > where (const Array< bool, N, E1 > &mask, const T &lhs, const Array< U, N, E2 > &rhs)
 
template<class T , class U , int N, class E >
Array< typename PromoteTypes< T, U >::ResultType, N, WhereExpr< Array< bool, N, E >, ScalarExpr< T >, ScalarExpr< U > > > where (const Array< bool, N, E > &mask, const T &lhs, const U &rhs)
 
template<class T , class I >
ArrayExpr< T, 1 > select (const ArrayExpr< T, 1 > &a, const I &idx)
 Selects a section of a one-dimensional array. More...
 
template<class T , class I , class J >
ArrayExpr< T, 2 > select (const ArrayExpr< T, 2 > &a, const I &idx, const J &jdx)
 Selects a section of a two-dimensional array. More...
 
template<class T , class I , class J , class K >
ArrayExpr< T, 3 > select (const ArrayExpr< T, 3 > &a, const I &idx, const J &jdx, const K &kdx)
 Selects a section of a three-dimensional array. More...
 
template<class T , class I , class J , class K , class L >
ArrayExpr< T, 4 > select (const ArrayExpr< T, 4 > &a, const I &idx, const J &jdx, const K &kdx, const L &ldx)
 Selects a section of a four-dimensional array. More...
 
template<class I >
TensorIndex operator+ (const TensorIndex &lhs, I rhs)
 
template<class I >
TensorIndex operator+ (I lhs, const TensorIndex &rhs)
 
template<class I >
TensorIndex operator- (const TensorIndex &lhs, I rhs)
 
template<class I >
TensorIndex operator* (const TensorIndex &lhs, I rhs)
 
template<class I >
TensorIndex operator* (I lhs, const TensorIndex &rhs)
 
template<class I >
TensorIndex operator/ (const TensorIndex &lhs, I rhs)
 
template<class T , int N>
min (const ArrayExpr< T, N > &e)
 Computes the minimum value of an array expression. More...
 
template<class T , int N>
max (const ArrayExpr< T, N > &e)
 Computes the maximum value of an array expression. More...
 
template<class T , int N>
sum (const ArrayExpr< T, N > &e)
 Computes the sum of all elements in an array expression. More...
 
template<class T , int N>
product (const ArrayExpr< T, N > &e)
 Computes the product of all elements in an array expression. More...
 
template<class T , int N>
bool testall (const ArrayExpr< T, N > &e)
 Tests whether all elements in an array expression are true. More...
 
template<class T , int N>
bool testany (const ArrayExpr< T, N > &e)
 Tests whether at least one element in an array expression is true. More...
 
template<class T >
void shift (const ArrayExpr< T, 1 > &e, int k)
 Shifts all elements in a one-dimensional array expresion. More...
 
template<class T >
void cshift (const ArrayExpr< T, 1 > &e, int k)
 Shifts all elements in a one-dimensional array expression in a circular way. More...
 
template<class T >
void reverse (const ArrayExpr< T, 1 > &e)
 Reverses the elements in a one-dimensional array expression. More...
 
template<class T , int N>
Array< T, N > reshape (const Array< T, 1 > &a, const Tuple< int, N > &sh)
 Converts a one-dimensional array to a multi-dimcnsional array. More...
 
template<class T , int N>
bool equal (const ArrayExpr< T, N > &lhs, const ArrayExpr< T, N > &rhs)
 Tests whether two array expressions are equal. More...
 
ArrayExpr< int, 1 > iarray (int n)
 Returns an enumeration of integers as an array expression. More...
 
ArrayExpr< int, 1 > iarray (const SliceTo &s)
 Returns an enumeration of integers as an array expression. More...
 
ArrayExpr< int, 1 > iarray (const Slice &s)
 Returns an enumeration of integers as an array expression. More...
 
ArrayExpr< int, 1 > iarray (const SliceFromTo &s)
 Returns an enumeration of integers as an array expression. More...
 
template<class T , int N>
Array< T, N > makeContiguous (const Array< T, N > &a)
 Converts an array to a contiguous array. More...
 
template<class T >
void sort (const Array< T > &a)
 Sorts a one-dimensional array in ascending order. More...
 
template<class T >
void sort (const Array< int > &perm, const Array< T > &a)
 Sorts an array in ascending order through an index array. More...
 
template<class T >
int binarySearch (const T &value, const Array< T > &a)
 Searches a sorted array for an element with a specific value. More...
 
template<class T >
int lowerBound (const T &value, const Array< T > &a)
 Searches a sorted array for the first element with a specific value. More...
 
template<class T >
int upperBound (const T &value, const Array< T > &a)
 Searches a sorted array for the first element that is larger than a specific value. More...
 
template<class T >
SliceFromTo equalRange (const T &value, const Array< T > &a)
 Searches a sorted array for a set of elements that all have a specific value. More...
 
template<class T , int N, class E >
Array< T, N, ImagExpr< E > > imag (const Array< std::complex< T >, N, E > &e)
 
template<class T , int N, class E >
Array< T, N, RealExpr< E > > real (const Array< std::complex< T >, N, E > &e)
 
bool checkIndex (short index, int ubound)
 
bool checkIndex (unsigned short index, int ubound)
 
bool checkIndex (int index, int ubound)
 
bool checkIndex (unsigned int index, int ubound)
 
bool checkIndex (lint index, int ubound)
 
bool checkIndex (ulint index, int ubound)
 
bool checkIndex (short index, lint ubound)
 
bool checkIndex (unsigned short index, lint ubound)
 
bool checkIndex (int index, lint ubound)
 
bool checkIndex (unsigned int index, lint ubound)
 
bool checkIndex (lint index, lint ubound)
 
bool checkIndex (ulint index, lint ubound)
 
void assertFailed_ (const char *expr, const char *mesg, const char *func, const char *file, int line)
 
void assertNoThrowFailed_ (const char *expr, const char *mesg, const char *func, const char *file, int line)
 
void precheckFailed_ (const char *expr, const char *mesg, const char *func, const char *file, int line)
 
template<class T >
void swap (AutoPointer< T > &lhs, AutoPointer< T > &rhs)
 
bool igetenv (lint &ival, const char *name)
 
template<class T >
minOf ()
 
template<class T >
minOf (const T &)
 
template<class T >
maxOf ()
 
template<class T >
maxOf (const T &)
 
bool isTiny (float x)
 
bool isTiny (double x)
 
void runOnce_ (Once &once, void(*func)(int), int i)
 
void runOnce_ (Once &once, void(*func)())
 
void runOnce (Once &once, void(*func)())
 
void runOnce (Once &once, void(*func)(int), int i)
 
void mallocFailed (const String &where, lint size)
 
template<class Getter >
Ref< FieldmakeField (const String &name, Getter getter)
 
template<class Getter , class Setter >
Ref< FieldmakeField (const String &name, Getter getter, Setter setter)
 
template<class M >
Ref< MethodmakeMethod (const String &name, M method)
 
template<class T >
ClasstypeOf ()
 
template<class T >
ClasstypeOf (const T &value)
 
template<class T >
bool isInstance (const Ref< Object > &obj)
 
template<class T >
Ref< ObjecttoObject (const T &value)
 
template<class T >
toValue (const Ref< Object > &obj)
 
template<class T >
bool toValue (T &value, const Ref< Object > &obj)
 
void swap (StringBuffer &lhs, StringBuffer &rhs)
 
void decode (io::DataInput &in, StringBuffer &sb)
 
void decode (io::DataOutput &out, const StringBuffer &sb)
 
void read (io::TextInput &in, StringBuffer &sb)
 
void print (io::TextOutput &out, const StringBuffer &sb)
 
template<class U , class T , int M, int N, class E >
Tuple< U, M, N, UnaryExpr< StaticCast< U, T >, Tuple< T, M, N, E > > > castTo (const Tuple< T, M, N, E > &e)
 
template<class T , class U , int M, int N, class E1 , class E2 , class E3 >
Tuple< typename PromoteTypes< T, U >::ResultType, M, N, WhereExpr< Tuple< bool, M, N, E1 >, Tuple< T, M, N, E2 >, Tuple< U, M, N, E3 > > > where (const Tuple< bool, M, N, E1 > &mask, const Tuple< T, M, N, E2 > &lhs, const Tuple< U, M, N, E3 > &rhs)
 
template<class T , class U , int M, int N, class E1 , class E2 >
Tuple< typename PromoteTypes< T, U >::ResultType, M, N, WhereExpr< Tuple< bool, M, N, E1 >, Tuple< T, M, N, E2 >, Tuple< U, 0, 0 > > > where (const Tuple< bool, M, N, E1 > &mask, const Tuple< T, M, N, E2 > &lhs, const U &rhs)
 
template<class T , class U , int M, int N, class E1 , class E2 >
Tuple< typename PromoteTypes< T, U >::ResultType, M, N, WhereExpr< Tuple< bool, M, N, E1 >, Tuple< T, 0, 0 >, Tuple< U, M, N, E2 > > > where (const Tuple< bool, M, N, E1 > &mask, const T &lhs, const Tuple< U, M, N, E2 > &rhs)
 
template<class T , class U , int M, int N, class E >
Tuple< typename PromoteTypes< T, U >::ResultType, M, N, WhereExpr< Tuple< bool, M, N, E >, Tuple< T, 0, 0 >, Tuple< U, 0, 0 > > > where (const Tuple< bool, M, N, E > &mask, const T &lhs, const U &rhs)
 
template<class T , int M, int N>
min (const TupleExpr< T, M, N > &e)
 Computes the minimum value of a tuple expression. More...
 
template<class T , int M, int N>
max (const TupleExpr< T, M, N > &e)
 Computes the maximum value of a tuple expression. More...
 
template<class T , int M, int N>
sum (const TupleExpr< T, M, N > &e)
 Computes the sum of all elements in a tuple expression. More...
 
template<class T , int M, int N>
product (const TupleExpr< T, M, N > &e)
 Computes the product of all elements in a tuple expression. More...
 
template<class T , int M, int N>
bool testall (const TupleExpr< T, M, N > &e)
 Tests whether all elements in a tuple expression are true. More...
 
template<class T , int M, int N>
bool testany (const TupleExpr< T, M, N > &e)
 Tests whether at least one element in a tuple expression is true. More...
 
template<class T , int M, int N>
bool equal (const TupleExpr< T, M, N > &lhs, const TupleExpr< T, M, N > &rhs)
 Tests whether two tuple expressions are equal. More...
 
template<class T >
Tuple< T, 1 > makeTuple (T a)
 Constructs a one-dimensional tuple of size 1. More...
 
template<class T >
Tuple< T, 2 > makeTuple (T a, T b)
 Constructs a one-dimensional tuple of size 2. More...
 
template<class T >
Tuple< T, 3 > makeTuple (T a, T b, T c)
 Constructs a one-dimensional tuple of size 3. More...
 
template<class T >
Tuple< T, 4 > makeTuple (T a, T b, T c, T d)
 Constructs a one-dimensional tuple of size 4. More...
 
void abort (const char *where, const char *what)
 Prints a message and aborts the current program. More...
 
template<class T >
const T & min (const T &lhs, const T &rhs)
 Returns the minimum of two values. More...
 
template<class T >
const T & max (const T &lhs, const T &rhs)
 Returns the maximum of two values. More...
 
template<class T >
void swap (T &lhs, T &rhs)
 Interchanges two objects. More...
 

Variables

relates Ref brief Creates a collectable object of type a T Equivalent with
 
const Nil NIL
 A pre-defined instance of the class Nil. More...
 

Detailed Description

The namespace jem contains the fundamental classes that are used in all other packages of Jive. These classes provide support for multi-dimensional array expresssions, multi-threading, reflection, garbage collection and exception handling.

All classes and functions in this namespace can be found in the package jem.base.

Function Documentation

template<class U , class T , int N, class E >
Array< U, N, UnaryExpr< StaticCast<U,T>, Array<T,N,E> > > jem::castTo ( const Array< T, N, E > &  e)
template<class T , class U , int N, class E1 , class E2 , class E3 >
Array< typename PromoteTypes<T,U>::ResultType, N, WhereExpr< Array<bool,N,E1>, Array<T,N,E2>, Array<U,N,E3> > > jem::where ( const Array< bool, N, E1 > &  mask,
const Array< T, N, E2 > &  lhs,
const Array< U, N, E3 > &  rhs 
)
template<class T , class U , int N, class E1 , class E2 >
Array< typename PromoteTypes<T,U>::ResultType, N, WhereExpr< Array<bool,N,E1>, Array<T,N,E2>, ScalarExpr<U> > > jem::where ( const Array< bool, N, E1 > &  mask,
const Array< T, N, E2 > &  lhs,
const U &  rhs 
)
template<class T , class U , int N, class E1 , class E2 >
Array< typename PromoteTypes<T,U>::ResultType, N, WhereExpr< Array<bool,N,E1>, ScalarExpr<T>, Array<U,N,E2> > > jem::where ( const Array< bool, N, E1 > &  mask,
const T &  lhs,
const Array< U, N, E2 > &  rhs 
)
template<class T , class U , int N, class E >
Array< typename PromoteTypes<T,U>::ResultType, N, WhereExpr< Array<bool,N,E>, ScalarExpr<T>, ScalarExpr<U> > > jem::where ( const Array< bool, N, E > &  mask,
const T &  lhs,
const U &  rhs 
)
template<class I >
TensorIndex jem::operator+ ( const TensorIndex &  lhs,
rhs 
)
template<class I >
TensorIndex jem::operator+ ( lhs,
const TensorIndex &  rhs 
)
template<class I >
TensorIndex jem::operator- ( const TensorIndex &  lhs,
rhs 
)
template<class I >
TensorIndex jem::operator* ( const TensorIndex &  lhs,
rhs 
)
template<class I >
TensorIndex jem::operator* ( lhs,
const TensorIndex &  rhs 
)
template<class I >
TensorIndex jem::operator/ ( const TensorIndex &  lhs,
rhs 
)
template<class T , int N, class E >
Array<T,N,ImagExpr<E> > jem::imag ( const Array< std::complex< T >, N, E > &  e)
Examples:
Array.cpp, and Tuple.cpp.
template<class T , int N, class E >
Array<T,N,RealExpr<E> > jem::real ( const Array< std::complex< T >, N, E > &  e)
Examples:
Array.cpp.
bool jem::checkIndex ( short  index,
int  ubound 
)
bool jem::checkIndex ( unsigned short  index,
int  ubound 
)
bool jem::checkIndex ( int  index,
int  ubound 
)
bool jem::checkIndex ( unsigned int  index,
int  ubound 
)
bool jem::checkIndex ( lint  index,
int  ubound 
)
bool jem::checkIndex ( ulint  index,
int  ubound 
)
bool jem::checkIndex ( short  index,
lint  ubound 
)
bool jem::checkIndex ( unsigned short  index,
lint  ubound 
)
bool jem::checkIndex ( int  index,
lint  ubound 
)
bool jem::checkIndex ( unsigned int  index,
lint  ubound 
)
bool jem::checkIndex ( lint  index,
lint  ubound 
)
bool jem::checkIndex ( ulint  index,
lint  ubound 
)
void jem::assertFailed_ ( const char *  expr,
const char *  mesg,
const char *  func,
const char *  file,
int  line 
)
void jem::assertNoThrowFailed_ ( const char *  expr,
const char *  mesg,
const char *  func,
const char *  file,
int  line 
)
void jem::precheckFailed_ ( const char *  expr,
const char *  mesg,
const char *  func,
const char *  file,
int  line 
)
template<class T >
void jem::swap ( AutoPointer< T > &  lhs,
AutoPointer< T > &  rhs 
)
related
bool jem::igetenv ( lint &  ival,
const char *  name 
)
template<class T >
T jem::minOf ( )
template<class T >
T jem::minOf ( const T &  )
template<class T >
T jem::maxOf ( )
template<class T >
T jem::maxOf ( const T &  )
bool jem::isTiny ( float  x)
bool jem::isTiny ( double  x)
void jem::runOnce_ ( Once once,
void(*)(int)  func,
int  i 
)
void jem::runOnce_ ( Once once,
void(*)()  func 
)
void jem::runOnce ( Once once,
void(*)()  func 
)
void jem::runOnce ( Once once,
void(*)(int)  func,
int  i 
)
void jem::mallocFailed ( const String where,
lint  size 
)
template<class Getter >
Ref< Field > jem::makeField ( const String name,
Getter  getter 
)
template<class Getter , class Setter >
Ref< Field > jem::makeField ( const String name,
Getter  getter,
Setter  setter 
)
template<class M >
Ref< Method > jem::makeMethod ( const String name,
method 
)
template<class T >
Class * jem::typeOf ( )
template<class T >
Class * jem::typeOf ( const T &  value)
template<class T >
bool jem::isInstance ( const Ref< Object > &  obj)
template<class T >
Ref< Object > jem::toObject ( const T &  value)
template<class T >
T jem::toValue ( const Ref< Object > &  obj)
template<class T >
bool jem::toValue ( T &  value,
const Ref< Object > &  obj 
)
void jem::swap ( StringBuffer lhs,
StringBuffer rhs 
)
void jem::decode ( io::DataInput in,
StringBuffer sb 
)
void jem::decode ( io::DataOutput out,
const StringBuffer sb 
)
void jem::read ( io::TextInput in,
StringBuffer sb 
)
void jem::print ( io::TextOutput out,
const StringBuffer sb 
)
template<class U , class T , int M, int N, class E >
Tuple< U, M, N, UnaryExpr< StaticCast<U,T>, Tuple<T,M,N,E> > > jem::castTo ( const Tuple< T, M, N, E > &  e)
template<class T , class U , int M, int N, class E1 , class E2 , class E3 >
Tuple< typename PromoteTypes<T,U>::ResultType, M, N, WhereExpr< Tuple<bool,M,N,E1>, Tuple<T,M,N,E2>, Tuple<U,M,N,E3> > > jem::where ( const Tuple< bool, M, N, E1 > &  mask,
const Tuple< T, M, N, E2 > &  lhs,
const Tuple< U, M, N, E3 > &  rhs 
)
template<class T , class U , int M, int N, class E1 , class E2 >
Tuple< typename PromoteTypes<T,U>::ResultType, M, N, WhereExpr< Tuple<bool,M,N,E1>, Tuple<T,M,N,E2>, Tuple<U,0,0> > > jem::where ( const Tuple< bool, M, N, E1 > &  mask,
const Tuple< T, M, N, E2 > &  lhs,
const U &  rhs 
)
template<class T , class U , int M, int N, class E1 , class E2 >
Tuple< typename PromoteTypes<T,U>::ResultType, M, N, WhereExpr< Tuple<bool,M,N,E1>, Tuple<T,0,0>, Tuple<U,M,N,E2> > > jem::where ( const Tuple< bool, M, N, E1 > &  mask,
const T &  lhs,
const Tuple< U, M, N, E2 > &  rhs 
)
template<class T , class U , int M, int N, class E >
Tuple< typename PromoteTypes<T,U>::ResultType, M, N, WhereExpr< Tuple<bool,M,N,E>, Tuple<T,0,0>, Tuple<U,0,0> > > jem::where ( const Tuple< bool, M, N, E > &  mask,
const T &  lhs,
const U &  rhs 
)

Variable Documentation

relates Ref brief Creates a collectable object of type a T Equivalent jem::with