Textile materials are characterised by the distinct hierarchy of structure: fibre yarn fabric ready product (preform), which should be represented by a model of textile geometry and mechanical behaviour. In spite of a profound investigation of textile materials and a number of theoretical models existing in the textile literature for different structures, the model covering all structures typical for composite reinforcements is not available. Hence the challenge addressed in the present work is to take a full advantage of the hierarchical principle of textile modelling, creating a truly integrated modelling and design tool. The architecture of the code implementing the model corresponds to the hierarchical structure of the textile material, which is represented as a library of generic C++ classes describing subsequent levels of it. The generic functionality of these classes, interface features and tools employing this functionality provides a framework for implementation of models of geometry and mechanical behaviour of different types of textiles. These are implemented as descendants of the generic classes using the inheritance mechanism of C++.