Since the development of nanoelectronics is at its early stage, a lot of different devices have been proposed. Accompanying the increasing research interests in nanodevices, developing effective design automation algorithms in different abstraction levels becomes an urgent need. However, the prosperity in the device aspect results a unique difficulty in the algorithm aspect, i.e. it is hard to provide a common object model, data structure used in design automation algorithms, for a specific nanodevice. To freeing algorithm researchers from developing different object models with only minor differences in different algorithms, the authors propose a method of creating object model automatically through C++ template meta programming. A concrete object model for quantum-dot cellular automata is illustrated as an example.