Minsky
classdesc Namespace Reference

Namespaces

 typescriptAPI_ns
 

Classes

struct  base_cast
 
struct  is_associative_container< minsky::ConstMap< std::string, minsky::VariableValue > >
 
struct  is_associative_container< minsky::IntrusiveMap< K, T > >
 
struct  is_itemT
 
struct  is_itemT< minsky::ItemT< T, B > >
 
struct  is_map
 
struct  is_map< std::map< K, V > >
 
struct  is_smart_ptr< minsky::Canvas::Model >
 
struct  is_smart_ptr< minsky::VariablePtr >
 
struct  is_smart_ptr< minsky::VariableValuePtr >
 
struct  RESTProcessPtr< minsky::ItemPtr >
 
struct  tn< boost::geometry::model::d2::point_xy< T > >
 
struct  tn< civita::any >
 
struct  tn< minsky::PannableTab< minsky::EquationDisplay > >
 
struct  tn< RESTProcess_t >
 
struct  tn< std::chrono::time_point< C, D > >
 
struct  tn< std::istream >
 
struct  typescriptAPI_t
 

Typedefs

template<class... >
using void_t = void
 

Functions

template<class T >
string typescriptType ()
 
template<class T >
enable_if< And< is_arithmetic< T >, And< Not< is_const< T > >, Not< is_same< T, bool > > > >, string >::T typescriptTypep ()
 
template<class T >
enable_if< is_same< T, bool >, string >::T typescriptTypep ()
 
template<class T >
enable_if< is_function< T >, string >::T typescriptTypep ()
 
template<class T >
enable_if< And< And< is_class< T >, And< Not< is_reference< T > >, Not< is_const< T > > > >, And< And< Not< is_string< T > >, And< Not< is_pointer< T > >, Not< is_itemT< T > > > >, And< And< Not< is_container< T > >, Not< is_iterator< T > > >, And< Not< is_smart_ptr< T > >, Not< is_pair< T > > > > > >, std::string >::T typescriptTypep ()
 typescript name corresponding to C++ type T More...
 
template<class T >
enable_if< is_enum< T >, string >::T typescriptTypep ()
 
template<class T >
enable_if< is_reference< T >, string >::T typescriptTypep ()
 
template<class T >
enable_if< is_pointer< T >, string >::T typescriptTypep ()
 
template<class T >
enable_if< is_const< T >, std::string >::T typescriptTypep ()
 
template<class T >
enable_if< And< is_iterator< T >, Not< is_pointer< T > > >, std::string >::T typescriptTypep ()
 
template<class T >
enable_if< And< And< is_sequence< T >, Not< is_const< T > > >, And< Not< is_arithmetic< typename T::value_type > >, Not< is_string< typename T::value_type > > > >, std::string >::T typescriptTypep ()
 
template<class T >
enable_if< And< is_sequence< T >, And< Not< is_const< T > >, Or< is_arithmetic< typename T::value_type >, is_string< typename T::value_type > > > >, std::string >::T typescriptTypep ()
 
template<class T >
enable_if< And< And< is_associative_container< T >, Not< is_map< T > > >, Not< is_const< T > > >, std::string >::T typescriptTypep ()
 
template<class T >
enable_if< And< is_map< T >, Not< is_const< T > > >, std::string >::T typescriptTypep ()
 
template<class T >
enable_if< And< is_smart_ptr< T >, Not< is_const< T > > >, std::string >::T typescriptTypep ()
 
template<class T >
enable_if< And< is_pair< T >, Not< is_const< T > > >, std::string >::T typescriptTypep ()
 
template<class T >
enable_if< is_itemT< T >, std::string >::T typescriptTypep ()
 
template<>
string typescriptType< string > ()
 
template<>
string typescriptType< void > ()
 
template<class C , class B >
enable_if< Not< is_map< B > >, void >::T typescriptAPI (typescriptAPI_t &, const std::string &)
 
template<class C , class B >
enable_if< is_map< B >, void >::T typescriptAPI (typescriptAPI_t &t, const std::string &)
 
template<class C , class B , class T >
enable_if< is_arithmetic< T >, void >::T typescriptAPI_type (typescriptAPI_t &t, const std::string &d, T(B::*))
 
template<class C , class B , class T >
enable_if< is_arithmetic< T >, void >::T typescriptAPI_type (typescriptAPI_t &t, const std::string &d, T *)
 
template<class VT >
std::string construct (const std::string &container, const std::string name)
 
template<class C , class B , class T >
enable_if< is_sequence< T >, void >::T typescriptAPI_type (typescriptAPI_t &t, const std::string &d, T *)
 
template<class C , class B , class T >
enable_if< is_sequence< T >, void >::T typescriptAPI_type (typescriptAPI_t &t, const std::string &d, T(B::*))
 
template<class C , class B , class T >
enable_if< Or< is_same< typename remove_const< T >::type, std::string >, is_enum< typename remove_const< T >::type > >, void >::T typescriptAPI_type (typescriptAPI_t &t, const std::string &d, T(B::*))
 
template<class C , class B , class T >
enable_if< Or< is_same< typename remove_const< T >::type, std::string >, is_enum< typename remove_const< T >::type > >, void >::T typescriptAPI_type (typescriptAPI_t &t, const std::string &d, T *)
 
template<class C , class B >
void typescriptAPI_type (typescriptAPI_t &t, const std::string &d, const char **)
 
template<class C , class B , class T >
void typescriptAPI_type (typescriptAPI_t &t, const std::string &d, std::set< T >(B::*))
 
template<class C , class B , class K , class V >
void typescriptAPI_type (typescriptAPI_t &t, const std::string &d, std::map< K, V >(B::*))
 
template<class C , class B , class V >
void typescriptAPI_type (typescriptAPI_t &t, const std::string &d, StringKeyMap< V >(B::*))
 
template<class C , class B , class M >
enable_if< functional::is_function< M >, void >::T typescriptAPI_type (typescriptAPI_t &t, const std::string &d, M)
 
template<class C , class B , class T >
enable_if< And< And< is_class< T >, Not< is_same< typename remove_const< T >::type, std::string > > >, And< Not< is_sequence< T > >, Not< is_excluded< T > > > >, void >::T typescriptAPI_type (typescriptAPI_t &t, const std::string &d, T(B::*))
 
template<class C , class B , class T >
enable_if< is_excluded< T >, void >::T typescriptAPI_type (typescriptAPI_t &t, const std::string &d, T(B::*))
 
template<class C , class B , class T >
enable_if< And< And< is_class< T >, Not< is_same< typename remove_const< T >::type, std::string > > >, Not< is_sequence< T > > >, void >::T typescriptAPI_type (typescriptAPI_t &t, const std::string &d, T *)
 
template<class T >
void typescriptAPI (typescriptAPI_t &, const std::string &, T,...)
 
void typescriptAPI_onbase (typescriptAPI_t &,...)
 
template<class C , class B >
void typescriptAPI_type (typescriptAPI_t &, const std::string &, is_constructor,...)
 
template<class C , class B , class T >
void typescriptAPI_type (typescriptAPI_t &t, const std::string &d, is_const_static, T a)
 
template<class T >
void xsd_generate (xsd_generate_t &g, const string &d, const minsky::Optional< T > &a)
 
template<class T >
void xml_pack (xml_pack_t &t, const string &d, minsky::Optional< T > &a)
 
template<class T >
void xml_unpackp (xml_unpack_t &t, const string &d, ecolab::array< T > &a)
 
template<>
std::string typeName< shared_ptr< schema1::Layout > > ()
 
template<>
void RESTProcess (RESTProcess_t &t, const string &d, minsky::VariableValues &a)
 
void RESTProcess (RESTProcess_t &t, const string &d, minsky::Minsky &m)
 
template<>
string typeName< cairo_t > ()
 
template<>
string typeName< cairo_surface_t > ()
 
template<class T , class Base >
enable_if< Not< is_map< Base > >, void >::T typescriptAPI (typescriptAPI_t &t, const string &d)
 

Typedef Documentation

◆ void_t

template<class... >
using classdesc::void_t = typedef void

Definition at line 16 of file typescriptAPI_base.h.

Function Documentation

◆ construct()

template<class VT >
std::string classdesc::construct ( const std::string &  container,
const std::string  name 
)

Definition at line 345 of file typescriptAPI_base.h.

346  {
347  string tn=typescriptType<VT>();
348  return "new "+container+"(this.$prefix()+'."+name+"'"+
349  ((is_string<VT>::value || is_enum<VT>::value || is_arithmetic<VT>::value)?"":","+tn)+");";
350  }

◆ RESTProcess() [1/2]

void classdesc::RESTProcess ( RESTProcess_t &  t,
const string &  d,
minsky::Minsky m 
)

Definition at line 28 of file minskyRS.cc.

29  {
31  t.add(d, new RESTProcessObject<minsky::Minsky>(m));
32  }

◆ RESTProcess() [2/2]

template<>
void classdesc::RESTProcess ( RESTProcess_t &  t,
const string &  d,
minsky::VariableValues a 
)
inline

Definition at line 1811 of file minsky.cc.

Referenced by minsky::RESTMinsky::RESTMinsky().

1812  {t.add(d, new RESTProcessAssociativeContainer<minsky::VariableValues>(a));}
Here is the caller graph for this function:

◆ typeName< cairo_surface_t >()

template<>
string classdesc::typeName< cairo_surface_t > ( )

Definition at line 109 of file typescriptAPI.cc.

109 {return "minsky__dummy";}

◆ typeName< cairo_t >()

template<>
string classdesc::typeName< cairo_t > ( )

Definition at line 108 of file typescriptAPI.cc.

108 {return "minsky__dummy";}

◆ typeName< shared_ptr< schema1::Layout > >()

template<>
std::string classdesc::typeName< shared_ptr< schema1::Layout > > ( )
inline

Definition at line 373 of file schema1.h.

374  {return "schema1::Layout";}

◆ typescriptAPI() [1/4]

template<class T , class Base >
enable_if<Not<is_map<Base> >, void>::T classdesc::typescriptAPI ( typescriptAPI_t t,
const string &  d 
)

Definition at line 152 of file typescriptAPI.cc.

153  {
154  // bail out of object heirarchy drill down once reaching named base class
155  if (typescriptType<Base>()==t[typescriptType<T>()].super) return;
156  classdesc_access::access_typescriptAPI<Base>().template type<T>(t,d);
157  }

◆ typescriptAPI() [2/4]

template<class C , class B >
enable_if<Not<is_map<B> >, void>::T classdesc::typescriptAPI ( typescriptAPI_t ,
const std::string &   
)

Definition at line 321 of file typescriptAPI_base.h.

322  {
323  if (typescriptType<C>().substr(0,4)!="Map<")
324  t[typescriptType<C>()].super="Map<"+typescriptType<typename B::key_type>()+","+
325  typescriptType<typename B::mapped_type>()+">";
326  }

◆ typescriptAPI() [3/4]

template<class C , class B >
enable_if<is_map<B>, void>::T classdesc::typescriptAPI ( typescriptAPI_t t,
const std::string &   
)

Definition at line 321 of file typescriptAPI_base.h.

322  {
323  if (typescriptType<C>().substr(0,4)!="Map<")
324  t[typescriptType<C>()].super="Map<"+typescriptType<typename B::key_type>()+","+
325  typescriptType<typename B::mapped_type>()+">";
326  }

◆ typescriptAPI() [4/4]

template<class T >
void classdesc::typescriptAPI ( typescriptAPI_t ,
const std::string &  ,
,
  ... 
)

Definition at line 494 of file typescriptAPI_base.h.

494 {} //not used

◆ typescriptAPI_onbase()

void classdesc::typescriptAPI_onbase ( typescriptAPI_t ,
  ... 
)
inline

Definition at line 496 of file typescriptAPI_base.h.

496 {} //not used

◆ typescriptAPI_type() [1/16]

template<class C , class B , class T >
enable_if<is_arithmetic<T>, void>::T classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
T(B::*)   
)

Definition at line 330 of file typescriptAPI_base.h.

331  {
332  t[typescriptType<C>()].methods.emplace(tail(d), typescriptAPI_ns::Method{parameterType<T>(), {{"...args",typescriptType<T>()+"[]"}}});
333  }

◆ typescriptAPI_type() [2/16]

template<class C , class B , class T >
enable_if<is_arithmetic<T>, void>::T classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
T *   
)

Definition at line 339 of file typescriptAPI_base.h.

340  {
341  t[typescriptType<C>()].methods.emplace(tail(d), typescriptAPI_ns::Method{typescriptType<T>(), {{"...args",typescriptType<T>()+"[]"}}});
342  }

◆ typescriptAPI_type() [3/16]

template<class C , class B , class T >
enable_if<is_sequence<T>, void>::T classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
T *   
)

Definition at line 354 of file typescriptAPI_base.h.

355  {
356  auto tn=typescriptType<typename T::value_type>();
357  t[typescriptType<C>()].properties.emplace
358  (tail(d), typescriptAPI_ns::Property
359  {"Sequence<"+tn+">", construct<typename T::value_type>("Sequence<"+tn+">", tail(d))});
360  }

◆ typescriptAPI_type() [4/16]

template<class C , class B , class T >
enable_if<is_sequence<T>, void>::T classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
T(B::*)   
)

Definition at line 364 of file typescriptAPI_base.h.

365  {typescriptAPI_type<C,B>(t,d,(T*){});}

◆ typescriptAPI_type() [5/16]

template<class C , class B , class T >
enable_if<Or<is_same<typename remove_const<T>::type,std::string>, is_enum<typename remove_const<T>::type> >, void>::T classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
T(B::*)   
)

Definition at line 370 of file typescriptAPI_base.h.

371  {
372  t[typescriptType<C>()].methods.emplace
373  (tail(d), typescriptAPI_ns::Method{"string",{{"...args","string[]"}}});
374  }

◆ typescriptAPI_type() [6/16]

template<class C , class B , class T >
enable_if<Or<is_same<typename remove_const<T>::type,std::string>, is_enum<typename remove_const<T>::type> >, void>::T classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
T *   
)

Definition at line 379 of file typescriptAPI_base.h.

380  {
381  t[typescriptType<C>()].methods.emplace(tail(d), typescriptAPI_ns::Method{"string", {{"...args","string[]"}}});
382  }

◆ typescriptAPI_type() [7/16]

template<class C , class B >
void classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
const char **   
)

Definition at line 385 of file typescriptAPI_base.h.

386  {typescriptAPI_type<C,B>(t,d,static_cast<const std::string*>(nullptr));}

◆ typescriptAPI_type() [8/16]

template<class C , class B , class T >
void classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
std::set< T >  B::* 
)

Definition at line 389 of file typescriptAPI_base.h.

390  {
391  string tn=typescriptType<T>();
392  t[typescriptType<C>()].properties.emplace
393  (tail(d), typescriptAPI_ns::Property{"Container<"+tn+">", construct<T>("Container<"+tn+">", tail(d))});
394  }

◆ typescriptAPI_type() [9/16]

template<class C , class B , class K , class V >
void classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
std::map< K, V >  B::* 
)

Definition at line 397 of file typescriptAPI_base.h.

398  {
399  string k=typescriptType<K>();
400  string v=typescriptType<V>();
401  t[typescriptType<C>()].properties.emplace
402  (tail(d), typescriptAPI_ns::Property
403  {"Map<"+k+","+v+">", construct<V>("Map<"+k+","+v+">",tail(d))});
404  }

◆ typescriptAPI_type() [10/16]

template<class C , class B , class V >
void classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
StringKeyMap< V >  B::* 
)

Definition at line 407 of file typescriptAPI_base.h.

408  {
409  string v=typescriptType<V>();
410  t[typescriptType<C>()].properties.emplace
411  (tail(d), typescriptAPI_ns::Property{"Map<string,"+v+">",construct<V>("Map<string,"+v+">",tail(d))});
412  }

◆ typescriptAPI_type() [11/16]

template<class C , class B , class M >
enable_if<functional::is_function<M>, void>::T classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
 
)

Definition at line 416 of file typescriptAPI_base.h.

References classdesc::typescriptAPI_ns::Method::addArgs().

417  {
418  auto& methods=t[typescriptType<C>()].methods;
419  auto iter=methods.find(typeName<C>());
420  if (iter==methods.end())
421  {
422  auto res=methods.emplace
423  (tail(d),
424  typescriptAPI_ns::Method{parameterType<typename functional::Return<M>::T>()});
425  if (res.second) // first occurance of this method
426  {
427  typescriptAPI_ns::Method& m=res.first->second;
428  m.addArgs<M>();
429  }
430  else // method seen before
431  {
432  auto oldArgs=std::move(res.first->second.args);
433  typescriptAPI_ns::Method& m=res.first->second;
434  m.addArgs<M>();
435  auto newArgs=res.first->second.args;
436  // check if arguments are same, in which case leave the method call
437  if (oldArgs!=res.first->second.args) // overloaded method
438  {
439  res.first->second.args={{"...args","any[]"}}; // set up general case or arbitrary args
440  //check if all arguments are the same (ie just numbers of arguments differ)
441  auto firstArg=!oldArgs.empty()? oldArgs[0]: res.first->second.args[0];
442  if (firstArg.type=="any[]") return;
443  if (firstArg.name=="...args") firstArg.type.erase(firstArg.type.length()-2); //strip off []
444  for (auto& i: oldArgs)
445  if (i!=firstArg) return;
446  for (auto& i: newArgs)
447  if (i!=firstArg) return;
448  res.first->second.args={{"...args",firstArg.type+"[]"}}; //restrict to common type
449  }
450  }
451  }
452  }
Here is the call graph for this function:

◆ typescriptAPI_type() [12/16]

template<class C , class B , class T >
enable_if< And< And< is_class<T>, Not<is_same<typename remove_const<T>::type,std::string> > >, And< Not<is_sequence<T> >, Not<is_excluded<T> > > >, void>::T classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
T(B::*)   
)

Definition at line 466 of file typescriptAPI_base.h.

467  {
468  typescriptAPI<T,T>(t,d);
469  t[typescriptType<C>()].properties.emplace(tail(d), typescriptType<T>());
470  }

◆ typescriptAPI_type() [13/16]

template<class C , class B , class T >
enable_if<is_excluded<T>, void>::T classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
T(B::*)   
)

Definition at line 474 of file typescriptAPI_base.h.

474 {}

◆ typescriptAPI_type() [14/16]

template<class C , class B , class T >
enable_if< And< And< is_class<T>, Not<is_same<typename remove_const<T>::type,std::string> > >, Not<is_sequence<T> > >, void>::T classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
T *   
)

Definition at line 486 of file typescriptAPI_base.h.

487  {
488  typescriptAPI<T,T>(t,d);
489  t[typescriptType<C>()].properties.emplace(tail(d), typescriptType<T>());
490  }

◆ typescriptAPI_type() [15/16]

template<class C , class B >
void classdesc::typescriptAPI_type ( typescriptAPI_t ,
const std::string &  ,
is_constructor  ,
  ... 
)

Definition at line 499 of file typescriptAPI_base.h.

499 {} //not used

◆ typescriptAPI_type() [16/16]

template<class C , class B , class T >
void classdesc::typescriptAPI_type ( typescriptAPI_t t,
const std::string &  d,
is_const_static  ,
a 
)

Definition at line 502 of file typescriptAPI_base.h.

503  {typescriptAPI_type<C,B>(t,d,a);}

◆ typescriptType()

template<class T >
string classdesc::typescriptType ( )

Definition at line 199 of file typescriptAPI_base.h.

199 {return typescriptTypep<T>();}

◆ typescriptType< string >()

template<>
string classdesc::typescriptType< string > ( )
inline

Definition at line 201 of file typescriptAPI_base.h.

201 {return "string";}

◆ typescriptType< void >()

template<>
string classdesc::typescriptType< void > ( )
inline

Definition at line 202 of file typescriptAPI_base.h.

202 {return "void";}

◆ typescriptTypep() [1/16]

template<class T >
enable_if< And< is_arithmetic<T>, And< Not<is_const<T> >, Not<is_same<T,bool> > > >, string>::T classdesc::typescriptTypep ( )
inline

Definition at line 46 of file typescriptAPI_base.h.

46 {return "number";}

◆ typescriptTypep() [2/16]

template<class T >
enable_if<is_same<T,bool>,string>::T classdesc::typescriptTypep ( )

Definition at line 50 of file typescriptAPI_base.h.

50 {return "boolean";}

◆ typescriptTypep() [3/16]

template<class T >
enable_if<is_function<T>, string>::T classdesc::typescriptTypep ( )
inline

Definition at line 54 of file typescriptAPI_base.h.

54 {return "minsky__dummy";}

◆ typescriptTypep() [4/16]

template<class T >
enable_if< And< And< is_class<T>, And< Not<is_reference<T> >, Not<is_const<T> > > >, And< And< Not<is_string<T> >, And< Not<is_pointer<T> >, Not<is_itemT<T> > > >, And< And< Not<is_container<T> >, Not<is_iterator<T> > >, And< Not<is_smart_ptr<T> >, Not<is_pair<T> > > > > >, std::string>::T classdesc::typescriptTypep ( )

typescript name corresponding to C++ type T

Definition at line 87 of file typescriptAPI_base.h.

References minsky::remove().

87  {
88  auto cppName=classdesc::typeName<T>();
89  // strip leading "::"
90  if (cppName.substr(0,2)=="::") cppName=cppName.substr(2);
91 
92  // minsky namespaced types to global namespace
93  auto n=cppName.find("minsky::");
94  if (n==0)
95  {
96  int numColons=0;
97  for (char c: cppName)
98  numColons += c==':';
99  if (numColons==2) // not in a sub namespace
100  return cppName.substr(strlen("minsky::"));
101  }
102 
103  std::replace(cppName.begin(), cppName.end(), ':', '_');
104  cppName.erase(std::remove(cppName.begin(), cppName.end(),' '), cppName.end());
105  return cppName;
106  }
void remove(std::vector< T > &x, const V &v)
remove an element from a vector. V must be comparable to a T
Definition: str.h:89
Here is the call graph for this function:

◆ typescriptTypep() [5/16]

template<class T >
enable_if<is_enum<T>, string>::T classdesc::typescriptTypep ( )

Definition at line 111 of file typescriptAPI_base.h.

111 {return "string";}

◆ typescriptTypep() [6/16]

template<class T >
enable_if<is_reference<T>, string>::T classdesc::typescriptTypep ( )

Definition at line 115 of file typescriptAPI_base.h.

115 {return typescriptType<typename remove_reference<T>::type>();}

◆ typescriptTypep() [7/16]

template<class T >
enable_if<is_pointer<T>, string>::T classdesc::typescriptTypep ( )

Definition at line 119 of file typescriptAPI_base.h.

119 {return typescriptType<typename remove_pointer<T>::type>();}

◆ typescriptTypep() [8/16]

template<class T >
enable_if<is_const<T>,std::string>::T classdesc::typescriptTypep ( )

Definition at line 123 of file typescriptAPI_base.h.

123 {return typescriptType<typename remove_const<T>::type>();}

◆ typescriptTypep() [9/16]

template<class T >
enable_if<And<is_iterator<T>,Not<is_pointer<T> > >,std::string>::T classdesc::typescriptTypep ( )

Definition at line 127 of file typescriptAPI_base.h.

127 {return "minsky__dummy";}

◆ typescriptTypep() [10/16]

template<class T >
enable_if< And< And< is_sequence<T>, Not<is_const<T> > >, And< Not<is_arithmetic<typename T::value_type> >, Not<is_string<typename T::value_type> > > >,std::string>::T classdesc::typescriptTypep ( )

Definition at line 142 of file typescriptAPI_base.h.

142 {return "Sequence<"+typescriptType<typename T::value_type>()+">";}

◆ typescriptTypep() [11/16]

template<class T >
enable_if< And< is_sequence<T>, And< Not<is_const<T> >, Or<is_arithmetic<typename T::value_type>, is_string<typename T::value_type> > > >,std::string>::T classdesc::typescriptTypep ( )

Definition at line 153 of file typescriptAPI_base.h.

153 {return typescriptType<typename T::value_type>()+"[]";}

◆ typescriptTypep() [12/16]

template<class T >
enable_if< And< And< is_associative_container<T>, Not<is_map<T> > >, Not<is_const<T> > >,std::string>::T classdesc::typescriptTypep ( )

Definition at line 164 of file typescriptAPI_base.h.

164 {return "Container<"+typescriptType<typename T::value_type>()+">";}

◆ typescriptTypep() [13/16]

template<class T >
enable_if< And< is_map<T>, Not<is_const<T> > >,std::string>::T classdesc::typescriptTypep ( )

Definition at line 172 of file typescriptAPI_base.h.

172  {
173  auto k=typescriptType<typename T::key_type>();
174  auto v=typescriptType<typename T::mapped_type>();
175  return "Map<"+k+","+v+">";}

◆ typescriptTypep() [14/16]

template<class T >
enable_if< And< is_smart_ptr<T>, Not<is_const<T> > >,std::string>::T classdesc::typescriptTypep ( )

Definition at line 183 of file typescriptAPI_base.h.

183 {return typescriptType<typename T::element_type>();}

◆ typescriptTypep() [15/16]

template<class T >
enable_if< And< is_pair<T>, Not<is_const<T> > >,std::string>::T classdesc::typescriptTypep ( )

Definition at line 191 of file typescriptAPI_base.h.

191  {return "Pair<"+typescriptType<typename T::first_type>()+","
192  +typescriptType<typename T::second_type>()+">";}

◆ typescriptTypep() [16/16]

template<class T >
enable_if<is_itemT<T>, std::string>::T classdesc::typescriptTypep ( )

Definition at line 197 of file typescriptAPI_base.h.

197 {return "Item";}

◆ xml_pack()

template<class T >
void classdesc::xml_pack ( xml_pack_t &  t,
const string &  d,
minsky::Optional< T > &  a 
)
inline

Definition at line 84 of file optional.h.

Referenced by minsky::Minsky::copy(), minsky::Minsky::pushHistory(), minsky::Saver::save(), and schema1::SPoly< WireLayout, Layout, VisibilityLayout >::xml_pack().

85  {if (a) ::xml_pack(t,d,*a);}
void xml_pack(xml_pack_t &t, const string &d, minsky::Optional< T > &a)
Definition: optional.h:84
Here is the caller graph for this function:

◆ xml_unpackp()

template<class T >
void classdesc::xml_unpackp ( xml_unpack_t &  t,
const string &  d,
ecolab::array< T > &  a 
)

Definition at line 253 of file schema0.h.

References xml_unpack().

254  {
255  string x; xml_unpack(t,d,x);
256  std::istringstream is(x);
257  is>>a;
258  }
void xml_unpack(classdesc::xml_unpack_t &, const classdesc::string &, classdesc::ref< ecolab::urand > &)
Here is the call graph for this function:

◆ xsd_generate()

template<class T >
void classdesc::xsd_generate ( xsd_generate_t &  g,
const string &  d,
const minsky::Optional< T > &  a 
)

Definition at line 77 of file optional.h.

Referenced by minsky::Minsky::exportSchema().

78  {
79  xsd_generate_t::Optional o(g,true);
80  T tmp; // a may be null
81  xsd_generate(g,d,tmp);
82  }
void xsd_generate(xsd_generate_t &g, const string &d, const minsky::Optional< T > &a)
Definition: optional.h:77
Here is the caller graph for this function: