Back to index

texmacs  1.0.7.15
Classes | Functions
blackbox.hpp File Reference
#include "basic.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  blackbox_rep
class  blackbox
class  whitebox_rep< T >

Functions

 ABSTRACT_NULL_CODE (blackbox)
bool operator== (blackbox bb1, blackbox bb2)
bool operator!= (blackbox bb1, blackbox bb2)
tm_ostreamoperator<< (tm_ostream &out, blackbox bb)
int type_box (blackbox bb)
template<class T >
blackbox close_box (const T &data)
template<class T >
T open_box (blackbox bb)

Function Documentation

template<class T >
blackbox close_box ( const T data)

Definition at line 61 of file blackbox.hpp.

                          {
  return tm_new<whitebox_rep<T> > (data);
}

Here is the caller graph for this function:

template<class T >
T open_box ( blackbox  bb)

Definition at line 66 of file blackbox.hpp.

                       {
  ASSERT (type_box (bb) == type_helper<T>::id, "type mismatch");
  return ((whitebox_rep<T>*) bb.rep) -> data;
}

Here is the call graph for this function:

bool operator!= ( blackbox  bb1,
blackbox  bb2 
) [inline]

Definition at line 48 of file blackbox.hpp.

                                                     {
  if (is_nil (bb1)) return !is_nil (bb2);
  else return !bb1->equal (bb2.rep); }

Here is the call graph for this function:

tm_ostream& operator<< ( tm_ostream out,
blackbox  bb 
) [inline]

Definition at line 51 of file blackbox.hpp.

                                                              {
  if (is_nil (bb)) return out << "nil";
  else return bb->display (out); }

Here is the call graph for this function:

bool operator== ( blackbox  bb1,
blackbox  bb2 
) [inline]

Definition at line 45 of file blackbox.hpp.

                                                     {
  if (is_nil (bb1)) return is_nil (bb2);
  else return bb1->equal (bb2.rep); }

Here is the call graph for this function:

int type_box ( blackbox  bb) [inline]

Definition at line 56 of file blackbox.hpp.

                       {
  return is_nil (bb)? 0: bb->get_type ();
}

Here is the call graph for this function: