SOL9 2.0 Class: Tree

 SOL9 C++ Class Library  SOL9 Samples  SOL9 Tutorial  SOL9 FAQ  SOL9 ClassTree 

Source code

/*
 * Tree.h 
 * Copyright (c) 2011 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL++2000
#pragma once

#include <sol\Object.h>
#include <sol\Node.h>

namespace SOL {

class Tree :public Object {
    Node*     root;
  public:
    Tree() { root = NULL; }
    ~Tree() { delete root; }
    Node*    search(const TCHAR* name) {
            if(root) 
                return root->search(name);
              else return NULL;
    }
    Node*     getRoot() { return root; }
    void     setRoot(Node* node) { root = node; }
};

}



Last modified: 1 Feb 2012

Copyright (c) 2009-2012 Antillia.com ALL RIGHTS RESERVED.