Artifact Content
Not logged in

Artifact 66f1242be8634b0708db123dd9838a470037ee5d


tricks.tricks

tricks.tricks

Authors:
k.inaba

License:
NYSL 0.9982 http://www.kmonos.net/nysl/

Common tricks and utilities for programming in D.

string sprintf (string fmt, T...)(T params);
Simple Wrapper for std.format.doFormat

ExceptionType genex (ExceptionType, string fn = __FILE__, int ln = __LINE__, T...)(T params);
Create an exception with automatically completed filename and lineno information

template SimpleConstructor ()
Mixing-in the bean constructor for a class

this(typeof(this.tupleof) params);
member-by-member constructor

template SimpleToHash ()
Mixing-in the MOST-DERIVED-member-wise comparator for a class BE SURE THAT THIS IS CONSISTENT WITH opCmp and opEquals

const hash_t toHash ();
member-by-member hash

template SimpleCompareWithoutToHash ()
Mixing-in the MOST-DERIVED-member-wise comparator for a class

const bool opEquals (Object rhs);
member-by-member equality

const int opCmp (Object rhs_);
member-by-member compare

template SimpleCompare ()
Mixing-in the MOST-DERIVED-member-wise comparator for a class

template SimpleToString ()
Mixing-in a simple toString method

string toString ();
member-by-member toString

template SimpleClass ()
Everything is in

template firstParam (T)
Utility

Page was generated with on Fri Nov 26 16:41:52 2010