Пример #1
0
int 
Namespace::namespaceParameterGetInstanceNumber(std::string address)
{
	TTList		returnedChildrenInstance;
	TTNodePtr	parentNode;
	std::string parentAddress, childAddress;
	
	// split the address
	size_t lastSlashPos = address.find_last_of("/");
	parentAddress		= address.substr(0, lastSlashPos);
	childAddress		= address.substr(lastSlashPos+1, std::string::npos);
	
	// get the parent node at the given address
	NSPDirectory->getTTNodeForOSC(TT(AppName + parentAddress), &parentNode);
	
	// get the list of children instances
	parentNode->getChildrenInstance(TT(childAddress), returnedChildrenInstance);
	
	return returnedChildrenInstance.getSize();
}