source: GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp @ 1022

Revision 1022, 18.6 KB checked in by mattausch, 18 years ago (diff)
Line 
1#include "SceneGraph.h"
2#include "Exporter.h"
3#include "UnigraphicsParser.h"
4#include "X3dParser.h"
5#include "Preprocessor.h"
6#include "ViewCell.h"
7#include "Environment.h"
8#include "ViewCellsManager.h"
9#include "ViewCellBsp.h"
10#include "VspBspTree.h"
11#include "RenderSimulator.h"
12#include "GlRenderer.h"
13#include "PlyParser.h"
14#include "SamplingStrategy.h"
15#include "VspOspTree.h"
16
17
18
19namespace GtpVisibilityPreprocessor {
20
21const static bool ADDITIONAL_GEOMETRY_HACK = false;
22
23Preprocessor *preprocessor;
24
25
26// HACK: Artificially modify scene to watch rendercost changes
27static void AddGeometry(SceneGraph *scene)
28{
29        scene->mRoot->UpdateBox();
30
31        AxisAlignedBox3 sceneBox = scene->GetBox();
32
33        int n = 200;
34
35        if (0){
36        // form grid of boxes
37        for (int i = 0; i < n; ++ i)
38        {
39                for (int j = 0; j < n; ++ j)
40                {
41                        const Vector3 scale2((float)j * 0.8 / n + 0.1,  0.05, (float)i * 0.8  / (float)n + 0.1);
42               
43                        const Vector3 pt2 = sceneBox.Min() + scale2 * (sceneBox.Max() - sceneBox.Min());
44               
45                        const Vector3 boxSize = sceneBox.Size() * Vector3(0.0025f, 0.01f, 0.0025f);
46                        AxisAlignedBox3 box(pt2, pt2 + boxSize);
47                        Mesh *mesh = CreateMeshFromBox(box);
48
49                        mesh->Preprocess();
50               
51                        MeshInstance *mi = new MeshInstance(mesh);
52                        scene->mRoot->mGeometry.push_back(mi);
53                }
54        }
55
56        for (int i = 0; i < n; ++ i)
57        {
58                for (int j = 0; j < n; ++ j)
59                {
60                        const Vector3 scale2(0.15, (float)j * 0.8 / n + 0.1, (float)i * 0.8  / (float)n + 0.1);
61               
62                        Vector3 pt2 = sceneBox.Min() + scale2 * (sceneBox.Max() - sceneBox.Min());
63               
64                        Vector3 boxSize = sceneBox.Size() * Vector3(0.0025, 0.01, 0.0025);
65                        AxisAlignedBox3 box(pt2, pt2 + boxSize);
66                        Mesh *mesh = CreateMeshFromBox(box);
67
68                        mesh->Preprocess();
69               
70                        MeshInstance *mi = new MeshInstance(mesh);
71                        scene->mRoot->mGeometry.push_back(mi);
72                }
73        }
74
75        for (int i = 0; i < n; ++ i)
76        {
77                const Vector3 scale2(2, 0.2, (float)i * 0.8  / (float)n + 0.1);
78               
79                Vector3 pt2 = sceneBox.Min() + scale2 * (sceneBox.Max() - sceneBox.Min());
80               
81                //Vector3 boxSize = sceneBox.Size() * Vector3(0.0025, 0.01, 0.0025);
82                Vector3 boxSize = sceneBox.Size() * Vector3(0.005, 0.02, 0.005);
83
84                AxisAlignedBox3 box(pt2 + 0.1, pt2 + boxSize);
85                Mesh *mesh = CreateMeshFromBox(box);
86
87                mesh->Preprocess();
88               
89                MeshInstance *mi = new MeshInstance(mesh);
90                scene->mRoot->mGeometry.push_back(mi);
91        }
92       
93        scene->mRoot->UpdateBox();
94        }
95       
96        // plane separating view space regions
97        if (1)
98        {
99                const Vector3 scale(1.0, 0.0, 0);
100
101                Vector3 pt = sceneBox.Min() + scale * (sceneBox.Max() - sceneBox.Min());
102
103                Plane3 cuttingPlane(Vector3(1, 0, 0), pt);
104                Mesh *planeMesh = new Mesh();
105               
106                Polygon3 *poly = sceneBox.CrossSection(cuttingPlane);
107                IncludePolyInMesh(*poly, *planeMesh);
108               
109                planeMesh->Preprocess();
110               
111                MeshInstance *planeMi = new MeshInstance(planeMesh);
112                scene->mRoot->mGeometry.push_back(planeMi);
113        }       
114}
115
116
117Preprocessor::Preprocessor():
118mKdTree(NULL),
119mBspTree(NULL),
120mVspBspTree(NULL),
121mViewCellsManager(NULL),
122mRenderSimulator(NULL)
123{
124        Environment::GetSingleton()->GetBoolValue("Preprocessor.useGlRenderer", mUseGlRenderer);
125 
126        // renderer will be constructed when the scene graph and viewcell manager will be known
127        renderer = NULL;
128 
129        Environment::GetSingleton()->GetBoolValue("Preprocessor.useGlDebugger", mUseGlDebugger);
130        Environment::GetSingleton()->GetBoolValue("Preprocessor.loadPolygonsAsMeshes", mLoadPolygonsAsMeshes);
131        Environment::GetSingleton()->GetBoolValue("Preprocessor.quitOnFinish", mQuitOnFinish);
132        Environment::GetSingleton()->GetBoolValue("Preprocessor.computeVisibility", mComputeVisibility);
133        Environment::GetSingleton()->GetBoolValue("Preprocessor.detectEmptyViewSpace", mDetectEmptyViewSpace);
134        Environment::GetSingleton()->GetBoolValue("Preprocessor.exportVisibility", mExportVisibility );
135
136        char buffer[256];
137        Environment::GetSingleton()->GetStringValue("Preprocessor.visibilityFile",  buffer);
138        mVisibilityFileName = buffer;
139        Environment::GetSingleton()->GetBoolValue("Preprocessor.applyVisibilityFilter", mApplyVisibilityFilter );
140        Environment::GetSingleton()->GetBoolValue("Preprocessor.applyVisibilitySpatialFilter",
141                                                          mApplyVisibilitySpatialFilter );
142        Environment::GetSingleton()->GetFloatValue("Preprocessor.visibilityFilterWidth", mVisibilityFilterWidth);
143
144        Debug << "detect empty view space=" << mDetectEmptyViewSpace << endl;
145        Debug << "load polygons as meshes: " << mLoadPolygonsAsMeshes << endl;
146}
147
148
149Preprocessor::~Preprocessor()
150{
151  cout << "cleaning up" << endl;
152
153  cout << "Deleting view cells manager ... \n";
154  DEL_PTR(mViewCellsManager);
155  cout << "done.\n";
156
157  cout << "Deleting bsp tree ... \n";
158  DEL_PTR(mBspTree);
159  cout << "done.\n";
160
161  cout << "Deleting kd tree...\n";
162  DEL_PTR(mKdTree);
163  cout << "done.\n";
164 
165#if 0
166  cout << "Deleting vsp osp tree...\n";
167  DEL_PTR(mVspOspTree);
168  cout << "done.\n";
169#endif
170
171  cout << "Deleting vspbsp tree...\n";
172  DEL_PTR(mVspBspTree);
173  cout << "done.\n";
174
175   cout << "Deleting scene graph...\n";
176  DEL_PTR(mSceneGraph);
177  cout << "done.\n";
178
179  DEL_PTR(mRenderSimulator);
180  DEL_PTR(renderer);
181}
182
183int
184SplitFilenames(const string str, vector<string> &filenames)
185{
186        int pos = 0;
187
188        while(1) {
189                int npos = (int)str.find(';', pos);
190               
191                if (npos < 0 || npos - pos < 1)
192                        break;
193                filenames.push_back(string(str, pos, npos - pos));
194                pos = npos + 1;
195        }
196       
197        filenames.push_back(string(str, pos, str.size() - pos));
198        return (int)filenames.size();
199}
200
201
202bool
203Preprocessor::LoadScene(const string filename)
204{
205        // use leaf nodes of the original spatial hierarchy as occludees
206        mSceneGraph = new SceneGraph;
207 
208        Parser *parser;
209        vector<string> filenames;
210        int files = SplitFilenames(filename, filenames);
211        cout << "number of input files: " << files << endl;
212        bool result = false;
213        if (files == 1) {
214               
215                if (strstr(filename.c_str(), ".x3d"))
216                  parser = new X3dParser;
217                else
218                  if (strstr(filename.c_str(), ".ply") || strstr(filename.c_str(), ".plb"))
219                        parser = new PlyParser;
220                  else
221                        parser = new UnigraphicsParser;
222
223                cout<<filename<<endl;
224                result = parser->ParseFile(filename, &mSceneGraph->mRoot, mLoadPolygonsAsMeshes);
225
226                delete parser;
227
228        } else {
229                // root for different files
230                mSceneGraph->mRoot = new SceneGraphNode;
231                for (int i= 0; i < filenames.size(); i++) {
232                        if (strstr(filenames[i].c_str(), ".x3d"))
233                                parser = new X3dParser;
234                        else
235                                parser = new UnigraphicsParser;
236                       
237                        SceneGraphNode *node;
238                        if (parser->ParseFile(filenames[i], &node)) {
239                                mSceneGraph->mRoot->mChildren.push_back(node);
240                                // at least one file parsed
241                                result = true;
242                        }
243                        delete parser;
244                }
245        }
246       
247
248        if (result)
249        {
250                // HACK
251                if (ADDITIONAL_GEOMETRY_HACK)
252                        AddGeometry(mSceneGraph);
253               
254                mSceneGraph->AssignObjectIds();
255       
256                int intersectables, faces;
257                mSceneGraph->GetStatistics(intersectables, faces);
258       
259                cout<<filename<<" parsed successfully."<<endl;
260                cout<<"#NUM_OBJECTS (Total numner of objects)\n"<<intersectables<<endl;
261                cout<<"#NUM_FACES (Total numner of faces)\n"<<faces<<endl;
262                mSceneGraph->CollectObjects(&mObjects);
263                mSceneGraph->mRoot->UpdateBox();
264
265                if (0)
266                {
267                        Exporter *exporter = Exporter::GetExporter("testload.x3d");
268
269                        if (exporter)
270                        {
271                                exporter->ExportGeometry(mObjects);
272                                delete exporter;
273                        }
274                }
275        }
276       
277       
278        return result;
279}
280
281bool
282Preprocessor::ExportPreprocessedData(const string filename)
283{
284 
285  mViewCellsManager->ExportViewCells(filename, true, mObjects);
286 
287  return true;
288}
289
290bool
291Preprocessor::PostProcessVisibility()
292{
293 
294  if (mApplyVisibilityFilter || mApplyVisibilitySpatialFilter) {
295        cout<<"Applying visibility filter ...";
296        cout<<"filter width = " << mVisibilityFilterWidth << endl;
297       
298        if (!mViewCellsManager)
299                return false;
300
301        mViewCellsManager->ApplyFilter(mKdTree,
302                                                                   mApplyVisibilityFilter ? mVisibilityFilterWidth : -1.0f,
303                                                                   mApplyVisibilitySpatialFilter ? mVisibilityFilterWidth : -1.0f);
304        cout << "done." << endl;
305  }
306 
307  // export the preprocessed information to a file
308  if (mExportVisibility)
309        ExportPreprocessedData(mVisibilityFileName);
310 
311  return true;
312}
313
314
315bool
316Preprocessor::BuildKdTree()
317{
318  mKdTree = new KdTree;
319  // add mesh instances of the scene graph to the root of the tree
320  KdLeaf *root = (KdLeaf *)mKdTree->GetRoot();
321  mSceneGraph->CollectObjects(&root->mObjects);
322 
323  mKdTree->Construct();
324  return true;
325}
326
327void
328Preprocessor::KdTreeStatistics(ostream &s)
329{
330  s<<mKdTree->GetStatistics();
331}
332
333void
334Preprocessor::BspTreeStatistics(ostream &s)
335{
336        s << mBspTree->GetStatistics();
337}
338
339bool
340Preprocessor::Export( const string filename,
341                                          const bool scene,
342                                          const bool kdtree,
343                                          const bool bsptree
344                                          )
345{
346  Exporter *exporter = Exporter::GetExporter(filename);
347       
348  if (exporter) {
349    if (scene)
350      exporter->ExportScene(mSceneGraph->mRoot);
351
352    if (kdtree) {
353      exporter->SetWireframe();
354      exporter->ExportKdTree(*mKdTree);
355    }
356
357        if (bsptree) {
358                //exporter->SetWireframe();
359                exporter->ExportBspTree(*mBspTree);
360        }
361
362    delete exporter;
363    return true;
364  }
365
366  return false;
367}
368
369
370bool Preprocessor::PrepareViewCells()
371{
372        //-- parse view cells construction method
373        Environment::GetSingleton()->GetBoolValue("ViewCells.loadFromFile", mLoadViewCells);
374        char buf[100];
375       
376        if (mLoadViewCells)
377        {       
378                Environment::GetSingleton()->GetStringValue("ViewCells.filename", buf);
379                mViewCellsManager = ViewCellsManager::LoadViewCells(buf, &mObjects, true);
380        }
381        else
382        {
383                //-- parse type of view cell container
384                Environment::GetSingleton()->GetStringValue("ViewCells.type", buf);             
385            mViewCellsManager = CreateViewCellsManager(buf);
386        }
387
388        //-- parameters for render heuristics evaluation
389        float objRenderCost = 0, vcOverhead = 0, moveSpeed = 0;
390
391        Environment::GetSingleton()->GetFloatValue("Simulation.objRenderCost",objRenderCost);
392        Environment::GetSingleton()->GetFloatValue("Simulation.vcOverhead", vcOverhead);
393        Environment::GetSingleton()->GetFloatValue("Simulation.moveSpeed", moveSpeed);
394       
395        mRenderSimulator =
396                new RenderSimulator(mViewCellsManager, objRenderCost, vcOverhead, moveSpeed);
397
398        mViewCellsManager->SetRenderer(mRenderSimulator);
399
400        // default view space is the extent of the scene
401        mViewCellsManager->SetViewSpaceBox(mSceneGraph->GetBox());
402
403        if (mUseGlRenderer || mUseGlDebugger)
404        {
405                // NOTE: render texture should be power of 2 and square
406                // renderer must be initialised
407                renderer = new GlRendererBuffer(1024, 768, mSceneGraph, mViewCellsManager, mKdTree);
408                //              renderer->makeCurrent();
409               
410        }
411       
412        return true;
413}
414
415
416ViewCellsManager *Preprocessor::CreateViewCellsManager(const char *name)
417{
418        if (strcmp(name, "kdTree") == 0)
419        {
420                mViewCellsManager = new KdViewCellsManager(mKdTree);
421        }
422        else if (strcmp(name, "bspTree") == 0)
423        {
424                Debug << "view cell type: Bsp" << endl;
425
426                mBspTree = new BspTree();
427                mViewCellsManager = new BspViewCellsManager(mBspTree);
428        }
429        else if (strcmp(name, "vspBspTree") == 0)
430        {
431                Debug << "view cell type: VspBsp" << endl;
432
433                mVspBspTree = new VspBspTree();
434                mViewCellsManager = new VspBspViewCellsManager(mVspBspTree);
435        }
436        else if (strcmp(name, "vspOspTree") == 0)
437        {
438                mVspTree = new VspTree();
439                mOspTree = new OspTree();
440
441                mViewCellsManager = new VspOspViewCellsManager(mVspTree, mOspTree);
442        }
443        else if (strcmp(name, "sceneDependent") == 0)
444        {
445                //TODO
446                mBspTree = new BspTree();
447
448                Debug << "view cell type: Bsp" << endl;
449               
450                mViewCellsManager = new BspViewCellsManager(mBspTree);
451        }
452        else
453        {
454                cerr << "Wrong view cells type " << name << "!!!" << endl;
455                exit(1);
456        }
457
458        return mViewCellsManager;
459}
460
461
462// use ascii format to store rays
463#define USE_ASCII 0
464
465
466inline bool ilt(Intersectable *obj1, Intersectable *obj2)
467{
468        return obj1->mId < obj2->mId;
469}
470
471
472bool Preprocessor::LoadSamples(VssRayContainer &samples,
473                                                           ObjectContainer &objects) const
474{
475        std::stable_sort(objects.begin(), objects.end(), ilt);
476        char fileName[100];
477        Environment::GetSingleton()->GetStringValue("Preprocessor.samplesFilename", fileName);
478       
479    Vector3 origin, termination;
480        // HACK: needed only for lower_bound algorithm to find the
481        // intersected objects
482        MeshInstance sObj(NULL);
483        MeshInstance tObj(NULL);
484
485#if USE_ASCII
486        ifstream samplesIn(fileName);
487        if (!samplesIn.is_open())
488                return false;
489
490        string buf;
491        while (!(getline(samplesIn, buf)).eof())
492        {
493                sscanf(buf.c_str(), "%f %f %f %f %f %f %d %d",
494                           &origin.x, &origin.y, &origin.z,
495                           &termination.x, &termination.y, &termination.z,
496                           &(sObj.mId), &(tObj.mId));
497               
498                Intersectable *sourceObj = NULL;
499                Intersectable *termObj = NULL;
500               
501                if (sObj.mId >= 0)
502                {
503                        ObjectContainer::iterator oit =
504                                lower_bound(objects.begin(), objects.end(), &sObj, ilt);
505                        sourceObj = *oit;
506                }
507               
508                if (tObj.mId >= 0)
509                {
510                        ObjectContainer::iterator oit =
511                                lower_bound(objects.begin(), objects.end(), &tObj, ilt);
512                        termObj = *oit;
513                }
514
515                samples.push_back(new VssRay(origin, termination, sourceObj, termObj));
516        }
517#else
518        ifstream samplesIn(fileName, ios::binary);
519        if (!samplesIn.is_open())
520                return false;
521
522        while (1)
523        {
524                 samplesIn.read(reinterpret_cast<char *>(&origin), sizeof(Vector3));
525                 samplesIn.read(reinterpret_cast<char *>(&termination), sizeof(Vector3));
526                 samplesIn.read(reinterpret_cast<char *>(&(sObj.mId)), sizeof(int));
527                 samplesIn.read(reinterpret_cast<char *>(&(tObj.mId)), sizeof(int));
528               
529                 if (samplesIn.eof())
530                        break;
531
532                Intersectable *sourceObj = NULL;
533                Intersectable *termObj = NULL;
534               
535                if (sObj.mId >= 0)
536                {
537                        ObjectContainer::iterator oit =
538                                lower_bound(objects.begin(), objects.end(), &sObj, ilt);
539                        sourceObj = *oit;
540                }
541               
542                if (tObj.mId >= 0)
543                {
544                        ObjectContainer::iterator oit =
545                                lower_bound(objects.begin(), objects.end(), &tObj, ilt);
546                        termObj = *oit;
547                }
548
549                samples.push_back(new VssRay(origin, termination, sourceObj, termObj));
550        }
551
552#endif
553        samplesIn.close();
554
555        return true;
556}
557
558
559bool Preprocessor::ExportSamples(const VssRayContainer &samples) const
560{
561        char fileName[100];
562        Environment::GetSingleton()->GetStringValue("Preprocessor.samplesFilename", fileName);
563       
564
565        VssRayContainer::const_iterator it, it_end = samples.end();
566       
567#if USE_ASCII
568        ofstream samplesOut(fileName);
569        if (!samplesOut.is_open())
570                return false;
571
572        for (it = samples.begin(); it != it_end; ++ it)
573        {
574                VssRay *ray = *it;
575                int sourceid = ray->mOriginObject ? ray->mOriginObject->mId : -1;               
576                int termid = ray->mTerminationObject ? ray->mTerminationObject->mId : -1;       
577
578                samplesOut << ray->GetOrigin().x << " " << ray->GetOrigin().y << " " << ray->GetOrigin().z << " "
579                                   << ray->GetTermination().x << " " << ray->GetTermination().y << " " << ray->GetTermination().z << " "
580                                   << sourceid << " " << termid << "\n";
581        }
582#else
583        ofstream samplesOut(fileName, ios::binary);
584        if (!samplesOut.is_open())
585                return false;
586
587        for (it = samples.begin(); it != it_end; ++ it)
588        {       
589                VssRay *ray = *it;
590                Vector3 origin(ray->GetOrigin());
591                Vector3 termination(ray->GetTermination());
592               
593                int sourceid = ray->mOriginObject ? ray->mOriginObject->mId : -1;               
594                int termid = ray->mTerminationObject ? ray->mTerminationObject->mId : -1;               
595
596                samplesOut.write(reinterpret_cast<char *>(&origin), sizeof(Vector3));
597                samplesOut.write(reinterpret_cast<char *>(&termination), sizeof(Vector3));
598                samplesOut.write(reinterpret_cast<char *>(&sourceid), sizeof(int));
599                samplesOut.write(reinterpret_cast<char *>(&termid), sizeof(int));
600    }
601#endif
602        samplesOut.close();
603        return true;
604}
605
606#if 0 // matt: implemented interface samplestrategy
607bool
608Preprocessor::GenerateRays(
609                                                   const int number,
610                                                   const int sampleType,
611                                                   SimpleRayContainer &rays
612                                                   )
613{
614  Vector3 origin, direction;
615  int startSize = (int)rays.size();
616  for (int i=0; (int)rays.size() - startSize  < number; i ++) {
617        // now get the direction
618        switch (sampleType) {
619        case OBJECT_BASED_DISTRIBUTION: {
620          mViewCellsManager->GetViewPoint(origin);
621          Vector3 point;
622          Vector3 normal;
623          int i = RandomValue(0, mObjects.size() - 1);
624          Intersectable *object = mObjects[i];
625          object->GetRandomSurfacePoint(point, normal);
626          direction = point - origin;
627        }
628          break;
629        case OBJECT_DIRECTION_BASED_DISTRIBUTION: {
630          int i = RandomValue(0, mObjects.size() - 1);
631          Intersectable *object = mObjects[i];
632          Vector3 normal;
633          object->GetRandomSurfacePoint(origin, normal);
634          direction = UniformRandomVector(normal);
635          origin += 0.1f*direction;
636        }
637          break;
638        case DIRECTION_BASED_DISTRIBUTION:
639          mViewCellsManager->GetViewPoint(origin);
640          direction = UniformRandomVector();
641          break;
642        case DIRECTION_BOX_BASED_DISTRIBUTION: {
643          mViewCellsManager->GetViewPoint(origin);
644          float alpha = RandomValue(0.0f, 2*M_PI);
645          float beta = RandomValue(-M_PI/2, M_PI/2);
646          direction = VssRay::GetDirection(alpha, beta);
647          break;
648        }
649        case SPATIAL_BOX_BASED_DISTRIBUTION:
650          mViewCellsManager->GetViewPoint(origin);
651          direction = mKdTree->GetBox().GetRandomPoint() - origin;
652          break;
653        default:
654          // unsuported distribution type
655          return false;
656        }
657        // $$ jb the pdf is yet not correct for all sampling methods!
658        float pdf = 1.0f;
659        float c = Magnitude(direction);
660        if (c > Limits::Small) {
661          direction*=1.0f/c;
662          rays.AddRay(SimpleRay(origin, direction, pdf));
663        }
664  }
665  return true;
666}
667#endif
668bool Preprocessor::GenerateRays(const int number,
669                                                                const int sampleType,
670                                                                SimpleRayContainer &rays)
671{
672        Vector3 origin, direction;
673       
674        const int startSize = (int)rays.size();
675        SamplingStrategy *strategy = GenerateSamplingStrategy(sampleType);
676
677        if (!strategy)
678                return false;
679
680        for (int i=0; (int)rays.size() - startSize < number; ++ i)
681        {
682                SimpleRay newRay;
683                bool success = strategy->GenerateSample(newRay);
684
685                if (success)
686                        rays.AddRay(newRay);
687        }
688
689        delete strategy;
690
691    return true;
692}
693
694
695SamplingStrategy *Preprocessor::GenerateSamplingStrategy(const int strategyId) const
696{
697        switch (strategyId)
698        {
699        case OBJECT_BASED_DISTRIBUTION:
700                return new ObjectBasedDistribution(*this);
701        case OBJECT_DIRECTION_BASED_DISTRIBUTION:
702                return new ObjectDirectionBasedDistribution(*this);
703        case DIRECTION_BASED_DISTRIBUTION:
704                return new DirectionBasedDistribution(*this);
705        case DIRECTION_BOX_BASED_DISTRIBUTION:
706                return new DirectionBoxBasedDistribution(*this);
707        case SPATIAL_BOX_BASED_DISTRIBUTION:
708                return new SpatialBoxBasedDistribution(*this);
709        //case OBJECTS_INTERIOR_DISTRIBUTION:
710        //      return new ObjectsInteriorDistribution(*this);
711        default: // no valid strategy
712                return NULL;
713        }
714        // should never come here
715        return NULL;
716}
717
718
719}
Note: See TracBrowser for help on using the repository browser.