Artifact Content
Not logged in

Artifact 67d9668f00ab57890b86d7fd21e11e274ec2b034


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 Thu Nov 25 12:15:09 2010