- Timestamp:
- 02/02/15 14:53:33 (10 years ago)
- Location:
- cpp/frams/_demos
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/loader_test_param.cpp
r316 r323 69 69 70 70 loader.addObject(¶m); 71 loader.breakOn(MultiParamLoader::OnError + MultiParamLoader::BeforeObject + MultiParamLoader::AfterObject + MultiParamLoader::OnComment );71 loader.breakOn(MultiParamLoader::OnError + MultiParamLoader::BeforeObject + MultiParamLoader::AfterObject + MultiParamLoader::OnComment + MultiParamLoader::BeforeUnknown); 72 72 73 73 while (int status = loader.go()) … … 77 77 case MultiParamLoader::OnComment: 78 78 fprintf(stderr, "comment: '%s'\n", (const char*)loader.getComment()); 79 break; 80 81 case MultiParamLoader::BeforeUnknown: 82 // At this point we could change our mind and load the unknown object using MultiParamLoader::loadObjectNow() functions. 83 // It is "unknown", so we would have to provide its ParamInterface. 84 // In fact, this method is used not just for truly unknown objects but also for 85 // dynamic objects that cannot be added using MultiParamLoader.addObject(). 86 fprintf(stderr, "unknown object found: '%s' (will be skipped)\n", (const char*)loader.getObjectName()); 79 87 break; 80 88 -
cpp/frams/_demos/loader_test_param.in
r316 r323 24 24 x:just x (string extvalue) 25 25 26 someotherdata: 27 this_object:will be ignored 28 because:we only load "data:" objects 29 26 30 data: 27 31 text:abcdefghijklmnopqrstuvwxyz
Note: See TracChangeset
for help on using the changeset viewer.