Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79205177
material_lister.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Aug 25, 06:40
Size
1 KB
Mime Type
text/x-c
Expires
Tue, Aug 27, 06:40 (2 d)
Engine
blob
Format
Raw Data
Handle
20018740
Attached To
rAKA akantu
material_lister.cc
View Options
/**
* @file material_lister.cc
*
* @author Nicolas Richart <nicolas.richart@epfl.ch>
*
* @date creation: Fri Mar 21 2014
* @date last modification: Fri Mar 21 2014
*
* @brief Small code that print out the list of materials
*
* @section LICENSE
*
* Copyright (©) 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* Akantu is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Akantu is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "material_list.hh"
#include <boost/preprocessor.hpp>
#include <iostream>
int main(int argc, char *argv[]) {
#define PRINT_OUT_OPTIONS(r, data, i, elem) \
<< ":" << BOOST_PP_STRINGIZE(BOOST_PP_TUPLE_ELEM(2, 0, elem))
#define PRINT_OUT(r, data, elem) \
std::cout << BOOST_PP_STRINGIZE(BOOST_PP_ARRAY_ELEM(0, elem)) << ":" \
<< BOOST_PP_STRINGIZE(BOOST_PP_ARRAY_ELEM(1, elem)) \
BOOST_PP_IF(BOOST_PP_EQUAL(3, BOOST_PP_ARRAY_SIZE(elem)), \
BOOST_PP_SEQ_FOR_EACH_I(PRINT_OUT_OPTIONS, \
_, \
BOOST_PP_ARRAY_ELEM(2, elem)), \
) \
<< std::endl;
BOOST_PP_SEQ_FOR_EACH(PRINT_OUT, _, AKANTU_MATERIAL_LIST);
return 0;
}
Event Timeline
Log In to Comment