File indexing completed on 2026-04-09 07:49:20
0001
0002
0003 #include <iostream>
0004 #include <iomanip>
0005 #include "sproplist.h"
0006
0007 void test_sprop_parse(const char* str)
0008 {
0009 sprop p ;
0010 std::cout << ( p.parse(str) ? p.desc() : "FAIL" ) << std::endl ;
0011 }
0012
0013 void test_sprop_parse()
0014 {
0015 const char* str0 = " 2 3 RINDEX 1.0 " ;
0016 const char* str1 = " 2 3 " ;
0017 test_sprop_parse(str0);
0018 test_sprop_parse(str1);
0019 }
0020
0021 void test_sproplist_Material()
0022 {
0023 const sproplist* pm = sproplist::Material() ;
0024 std::cout << "pm.desc" << std::endl << pm->desc() ;
0025
0026 std::vector<std::string> names ;
0027 pm->getNames(names) ;
0028
0029 std::cout << "names.size " << names.size() << std::endl ;
0030 for(size_t i=0 ; i < names.size() ; i++)
0031 {
0032 const char* name = names[i].c_str();
0033 const sprop* prop = pm->findProp(name) ;
0034 std::cout << std::setw(20) << name << " : " << prop->desc() << std::endl ;
0035 }
0036
0037 for(int g=0 ; g < sprop::NUM_PAYLOAD_GRP ; g++)
0038 {
0039 for(int v=0 ; v < sprop::NUM_PAYLOAD_VAL ; v++)
0040 {
0041 const sprop* prop = pm->get(g,v) ;
0042 std::cout << " pm.get(" << g << "," << v << ") " << prop->desc() << std::endl ;
0043 }
0044 }
0045 }
0046
0047
0048 int main(int argc, char** argv)
0049 {
0050 test_sproplist_Material();
0051
0052 return 0 ;
0053 }