]> Creatis software - bbtk.git/blobdiff - kernel/appli/bbCreateBlackBox/xml-templates/widget-template.xml
Some cleaning
[bbtk.git] / kernel / appli / bbCreateBlackBox / xml-templates / widget-template.xml
index 4e321db4dd9a015b9847b6ef4e7f7ba0cd72f85b..ec1d45b2c22babee01becd16cc624846a0a67d49 100644 (file)
@@ -1,11 +1,20 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-
+<!--==========================================================================
+   STARTS THE DESCRIPTION OF THE BLACK BOX -->
 <blackbox name="__BLACKBOXNAME__" widget>
-
+ <!--========================================================================
+    THE BOX DOCUMENTATION -->
   <author>__AUTHOR__</author>
   <description>__DESCRIPTION__</description>
   <category>__CategoryBlackBox__</category>
 
+<!--========================================================================
+    #include directives to be put in the .h generated
+    There must be one tag per file to include -->
+
+ <!--========================================================================
+    INPUTS/OUTPUTS DECLARATION -->
+
   <input name="Title" type="std::string" description="Title prepended to the text"/>
   <input name="In" type="std::string" description="Text"/>
 
    bbSetOutputWidget( new wxStaticText ( bbGetWxParent() , -1 , _T("") ) );
    Process();
   </PRE></createwidget>
+
+ <!--========================================================================
+    PROCESS section -->
+
   <process><PRE>
    std::string msg;
     if (bbGetInputTitle()!="")
       {
        msg = bbGetInputTitle()+": " + bbGetInputIn();
-      }  
-    else 
+      }
+    else
       {
        msg = bbGetInputIn();
       }
    ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) ); 
   </PRE></process>
-  
+
+ <!--======================================================================
+   CONSTRUCTORS / DESTRUCTORS (OPTIONAL) -->
+
   <constructor><PRE> 
     bbSetInputIn("");
     bbSetInputTitle("");
-  </PRE></constructor>    
+  </PRE>
+  </constructor>
+
+</copyconstructor>
+  <!-- THE COPY-CONSTRUCTION METHOD BODY :
+    Here does nothing 
+    But this is where you should allocate the output pointers if any
+    and copy the pointed values (to avoid bug caused by multiple references)-->
+  <copyconstructor>
+  <PRE>
+
+  </PRE>
+  <!-- THE DESTRUCTION METHOD BODY :
+    Here does nothing 
+    but this is where you should desallocate the output pointers if any -->
+
+  <destructor>
+  <PRE>
+
+  </PRE>
+  </destructor>
+
 
 
 </blackbox>