Skip to content

Commit

Permalink
this refactoring experiment is going to take long...
Browse files Browse the repository at this point in the history
  • Loading branch information
nical committed Feb 26, 2011
1 parent dd2e90d commit b1f9702
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 377 deletions.
4 changes: 2 additions & 2 deletions src/kiwi/CMakeLists.txt
Expand Up @@ -20,8 +20,8 @@ if(DEFINED BUILD_KIWI_TEXT)
text/PlainTextContainer.cpp
text/PlainTextLine.cpp
text/PlainTextAccessor.cpp
text/TextReader.cpp
text/TextWriter.cpp
# text/TextReader.cpp
# text/TextWriter.cpp
utils/TextOperations.cpp
)
endif(DEFINED BUILD_KIWI_TEXT)
Expand Down
20 changes: 5 additions & 15 deletions src/kiwi/core/Node.cpp
Expand Up @@ -86,8 +86,8 @@ portIndex_t Node::addReaderPort()
{
//ScopedBlockMacro(scop_b,"addDataPort("+name+")");
// portIndex_t index = getReaderInputCount();
_readerInputs.push_back( new ReaderPort(this) );
return _readerInputs.size()-1;
_readerPorts.push_back( new ReaderPort(this) );
return _readerPorts.size()-1;
}


Expand All @@ -103,25 +103,15 @@ portIndex_t Node::addDataPort(Container* data)
return _dataPorts.size()-1;
}

void Node::addContainer(Container* data, bool addReader, bool addWriter)
void Node::addContainer(Container* data, bool addPort, kiwi::uint8_t flags)
{
ScopedBlockMacro(__scop, "Node::addContainer" )
if(!data) Debug::print() << "warning: the init parameter is nil\n";
_containers.add(data);
portIndex_t reader, writer;
if(addReader){
reader = addDataPort(data);
if(addPort){
reader = addDataPort(data,flag);
}
if(addWriter){
writer = addDataPort(data);
}
if( addReader && addWriter ){
Debug::print() << "Node::addContainer: associating ports\n";
// Debug::print() << "readerId: " << (int)reader
// << "writererId: " << (int)writer << endl();
writerOutputPort(reader)._associatedDataPort // todo investigate from this
= &readerOutputPort(writer);
}else{Debug::error() << "Node::addContainer: woops ?\n";}
}


Expand Down
2 changes: 1 addition & 1 deletion src/kiwi/core/Node.hpp
Expand Up @@ -231,7 +231,7 @@ class Node
* @param portName The name of the port.
*/
/*
WriterOutputPort* writerOutputPort(const kiwi::string& portName) const
DataPort* writerOutputPort(const kiwi::string& portName) const
{
for( kiwi::uint32_t i = 0; i < nbWriterOutputs(); ++i )
{
Expand Down
4 changes: 0 additions & 4 deletions src/kiwi/core/Ports.hpp

This file was deleted.

4 changes: 2 additions & 2 deletions src/kiwi/core/ReaderPort.cpp
Expand Up @@ -101,7 +101,7 @@ Node* ReaderPort::node() const
Tags ReaderPort::tags() const
{
ScopedBlockMacro(scop,"ReaderPort::tags")
return node()->readerInputTags( index() );
return node()->readerTags( index() );
}

bool ReaderPort::isCompatible(DataPort& output)
Expand Down Expand Up @@ -130,7 +130,7 @@ DataPort* ReaderPort::connectedOutput() const

kiwi::string ReaderPort::name() const
{
return _node->readerInputName(_node->indexOf(*this));
return _node->readerName(_node->indexOf(*this));
}


Expand Down
2 changes: 1 addition & 1 deletion src/kiwi/core/ReaderPort.hpp
Expand Up @@ -140,7 +140,7 @@ friend class Node;
* @see kiwi::core::setReaderPortEnabled
* @see kiwi::core::setDataPortEnabled
* @see kiwi::core::setWriterPortEnabled
* @see kiwi::core::setWriterOutputPortEnabled
* @see kiwi::core::setDataPortEnabled
*/
void setEnabled(bool status);

Expand Down
152 changes: 0 additions & 152 deletions src/kiwi/core/WriterOutputPort.cpp

This file was deleted.

0 comments on commit b1f9702

Please sign in to comment.