return "::" + mTypeName;
}
//=========================================================================
-
+ void BlackBoxDescriptor::GetBoxesInside (NodeTreeC& tree, std::vector<std::string>& temp, int cont){
+
+ }
//=========================================================================
void BlackBoxDescriptor::InsertHtmlHelp ( std::ofstream& s,
int detail, int level,
#include "bbtkBlackBoxOutputDescriptor.h"
#include <map>
#include <fstream>
-
+#include "bbtkUtilities.h"
namespace bbtk
{
///
virtual void Check(bool recursive=true) const;
-
+ virtual void GetBoxesInside (NodeTreeC& tree, std::vector<std::string>& temp, int cont);
/// Sets the name of the script file from which it is defined
void SetScriptFileName(const std::string& n) { mScriptFileName = n; }
Package::Pointer p = d->GetPackage();
std::string name = b->second->bbGetTypeName();
-
+
std::string url;
if (relative_link)
url = p->GetDocRelativeURL();
return s;
}
//==========================================================================
+void ComplexBlackBoxDescriptor::GetBoxesInside (NodeTreeC& tree, std::vector<std::string>& list, int cont)
+ {
+ std::string name = GetTypeName();
+ std::string descr = GetDescription();
+ std::string author = GetAuthor();
+ list.push_back(name);
+ tree.setData(name);
+ // list.push_back(descr);
+ // list.push_back(author);
+ int k = 0;
+ const ComplexBlackBox::BlackBoxMapType& B = mPrototype->bbGetBlackBoxMap();
+ if (B.size())
+ {
+ std::set<BlackBoxDescriptor::Pointer> pdeps;
+ ComplexBlackBox::BlackBoxMapType::const_iterator b;
+ for ( b = B.begin(); b != B.end(); ++b )
+ {
+ BlackBoxDescriptor::Pointer d = b->second->bbGetDescriptor();
+
+
+ //if (pdeps.find(d) != pdeps.end())
+ // continue;
+ //pdeps.insert(d);
+
+ Package::Pointer p = d->GetPackage();
+ std::string nameBox = b->second->bbGetTypeName();
+ std::string packageBox = p->GetName();
+
+ tree.insertChild(nameBox);
+
+ list.push_back(nameBox);
+ list.push_back(packageBox);
+
+ d->GetBoxesInside (tree.childs[k],list, cont+1);
+ k++;
+ } // for
+
+ } // If B.size
+
+ }
+
+//===================================================
+
+ //==========================================================================
}
#include "bbtkComplexBlackBoxOutputDescriptor.h"
#include "bbtkFactory.h"
#include <fstream>
-
+#include <vector>
+#include "bbtkUtilities.h"
namespace bbtk
{
const std::string& output_dir = "",
bool relative_link = false );
-
+ void GetBoxesInside (NodeTreeC& tree, std::vector<std::string>& list, int cont);
///
virtual void Check(bool recursive=true) const;
//==========================================================================
-
}
// namespace bbtk
#endif
return s;
}
//==========================================================================
-
+ void Package::GetBoxesInside(NodeTreeC& tree, std::vector<std::string>& list, int cont)
+ {
+ DescriptorMapType::const_iterator i;
+
+ std::vector<std::string> temp;
+ for (i=mDescriptorMap.begin(); i!=mDescriptorMap.end(); ++i)
+ {
+ i->second->GetBoxesInside(tree, list, cont);
+ list.insert( list.end(), temp.begin(), temp.end() );
+ }
+ }
+ //==========================================================================
//==========================================================================
std::set<Package::WeakPointer>
Package::mReleasedDynamicallyLoadedPackages;
//==========================================================================
+
}
#include "bbtkBlackBox.h"
#include "bbtkDynamicLibraryHandling.h"
+#include "bbtkUtilities.h"
+#include <vector>
namespace bbtk
{
const std::string& pkgname,
const std::string& path);
+ void GetBoxesInside(NodeTreeC& tree, std::vector<std::string>& list, int cont);
/// NOTE : All the static methods below for package destruction
/// are not member because they can cause the package death
/// and thus close the dynamic library from which it has been loaded.
}
//=========================================================================
+//TAD Arbol CFT
+//---------NodeTree---------------
+
+NodeTreeC::NodeTreeC()
+{
+
+}
+
+NodeTreeC::NodeTreeC(std::string _data)
+{
+ data = _data;
+}
+
+NodeTreeC::~NodeTreeC()
+{
+
+}
+
+void NodeTreeC::insertChild(std::string _data)
+{
+ NodeTreeC temp = NodeTreeC(_data);
+ childs.push_back(temp);
+}
+
+void NodeTreeC::treeTour()
+{
+ std::cout <<"data "<< data << std::endl;
+ std::cout <<"size "<< childs.size() << std::endl;
+ for(int i = 0 ; i < childs.size(); i++)
+ {
+ childs[i].treeTour();
+ }
+}
+
+void NodeTreeC::setData(std::string _data)
+{
+ data = _data;
+}
+
+
+//---------Tree------------
+/*
+TreeC::TreeC()
+{
+
+}
+
+TreeC::TreeC(std::string _data)
+{
+ root = NodeTreeC(_data);
+}
+
+TreeC::~TreeC()
+{
+
+}
+
+void TreeC::insertRoot(std::string _data)
+{
+ NodeTreeC temp = NodeTreeC(_data);
+ root = temp;
+}
+
+void TreeC::treeTour()
+{
+ root.treeTour();
+}
+
+void TreeC::insertData(std::string _data)
+{
+
+}
+
+TreeC* TreeC::getSubTree()
+{
+ TreeC temp;
+ temp.root = root.childs[0];
+ return ;
+}
+*/
+
}
};
-
+class NodeTreeC
+{
+public:
+ std::string data;
+ std::vector<NodeTreeC> childs;
+
+ NodeTreeC();
+ NodeTreeC(std::string _data);
+ ~NodeTreeC();
+ void insertChild(std::string _data);
+ void treeTour();
+ void setData(std::string _data);
+};
+/*
+class TreeC
+{
+public:
+ NodeTreeC root;
+
+ TreeC();
+ TreeC(std::string _data);
+ ~TreeC();
+ void insertRoot(std::string _data);
+ void treeTour();
+ void insertData(std::string _data);
+ TreeC getSubTree();
+};
+ */
} // namespace bbtk