Update of /cvsroot/boost/boost/tools/quickbook/detail
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7436/detail

Modified Files:
        actions.cpp actions.hpp actions_class.cpp actions_class.hpp 
        markups.hpp 
Log Message:
* Simple markups can now span a whole block.
* __blurbs__, __admonitions__ and table cells (see __tables__) may now
  contain paragraphs.
* `\n` and `[br]` are now deprecated.

Index: actions.cpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/detail/actions.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- actions.cpp 21 Feb 2007 00:48:28 -0000      1.47
+++ actions.cpp 27 Feb 2007 15:22:15 -0000      1.48
@@ -23,6 +23,15 @@
 
 namespace quickbook
 {
+    // Handles line-breaks (DEPRECATED!!!)
+    void break_action::operator()(iterator first, iterator) const
+    {
+        boost::spirit::file_position const pos = first.get_position();
+        detail::outwarn(pos.file,pos.line) << "in column:" << pos.column << ", 
"
+            << "[br] and \\n are deprecated" << ".\n";
+        phrase << break_mark;
+    }
+
     void error_action::operator()(iterator first, iterator /*last*/) const
     {
         boost::spirit::file_position const pos = first.get_position();
@@ -695,9 +704,18 @@
     void start_col_action::operator()(char) const
     {
         phrase << start_cell_;
+        phrase.push();
         ++span;
     }
 
+    void end_col_action::operator()(char) const
+    {
+        std::string str;
+        temp_para.swap(str);
+        phrase.pop();
+        phrase << str << end_cell_;
+    }
+
     void begin_section_action::operator()(iterator first, iterator last) const
     {
         if (section_id.empty())

Index: actions.hpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/detail/actions.hpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- actions.hpp 20 Dec 2006 15:41:20 -0000      1.35
+++ actions.hpp 27 Feb 2007 15:22:15 -0000      1.36
@@ -39,7 +39,7 @@
     struct actions;
     extern tm* current_time; // the current time
     extern tm* current_gm_time; // the current UTC time
-    extern bool debug_mode; 
+    extern bool debug_mode;
     extern unsigned qbk_major_version;
     extern unsigned qbk_minor_version;
     extern unsigned qbk_version_n; // qbk_major_version * 100 + 
qbk_minor_version
@@ -47,7 +47,7 @@
     // forward declarations
     struct actions;
     int parse(char const* filein_, actions& actor, bool ignore_docinfo = 
false);
-    
+
     struct error_action
     {
         // Prints an error message to std::cerr
@@ -307,7 +307,7 @@
       , unexpected_char
       , collector>
     cpp_p_type;
-        
+
     typedef python_highlight<
         span
       , space
@@ -417,7 +417,7 @@
 
         collector& phrase;
     };
-    
+
     struct markup_action
     {
         // A generic markup action
@@ -441,6 +441,18 @@
         std::string str;
     };
 
+    struct break_action
+    {
+        // Handles line-breaks (DEPRECATED!!!)
+
+        break_action(collector& phrase)
+        : phrase(phrase) {}
+
+        void operator()(iterator f, iterator) const;
+
+        collector& phrase;
+    };
+
     struct macro_identifier_action
     {
         // Handles macro identifiers
@@ -480,7 +492,7 @@
     struct do_template_action
     {
         // Handles template substitutions
-        
+
         do_template_action(quickbook::actions& actions)
         : actions(actions) {}
 
@@ -554,6 +566,17 @@
         unsigned& span;
     };
 
+    struct end_col_action
+    {
+        end_col_action(collector& phrase, collector& temp_para)
+        : phrase(phrase), temp_para(temp_para) {}
+
+        void operator()(char) const;
+
+        collector& phrase;
+        collector& temp_para;
+    };
+
     struct begin_section_action
     {
         // Handles begin page

Index: actions_class.cpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/detail/actions_class.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- actions_class.cpp   20 Dec 2006 15:41:20 -0000      1.8
+++ actions_class.cpp   27 Feb 2007 15:22:15 -0000      1.9
@@ -72,7 +72,7 @@
         , code_block(phrase, phrase, temp, source_mode, macro, *this)
         , inline_code(phrase, temp, source_mode, macro, *this)
         , paragraph(out, phrase, paragraph_pre, paragraph_post)
-        , comment(phrase, comment_pre, comment_post, macro)
+        , inside_paragraph(temp_para, phrase, paragraph_pre, paragraph_post)
         , h(out, phrase, doc_id, section_id, qualified_section_id, 
section_level)
         , h1(out, phrase, doc_id, section_id, qualified_section_id, h1_pre, 
h1_post)
         , h2(out, phrase, doc_id, section_id, qualified_section_id, h2_pre, 
h2_post)
@@ -81,14 +81,14 @@
         , h5(out, phrase, doc_id, section_id, qualified_section_id, h5_pre, 
h5_post)
         , h6(out, phrase, doc_id, section_id, qualified_section_id, h6_pre, 
h6_post)
         , hr(out, hr_)
-        , blurb(out, phrase, blurb_pre, blurb_post)
-        , blockquote(out, phrase, blockquote_pre, blockquote_post)
+        , blurb(out, temp_para, blurb_pre, blurb_post)
+        , blockquote(out, temp_para, blockquote_pre, blockquote_post)
         , preformatted(out, phrase, preformatted_pre, preformatted_post)
-        , warning(out, phrase, warning_pre, warning_post)
-        , caution(out, phrase, caution_pre, caution_post)
-        , important(out, phrase, important_pre, important_post)
-        , note(out, phrase, note_pre, note_post)
-        , tip(out, phrase, tip_pre, tip_post)
+        , warning(out, temp_para, warning_pre, warning_post)
+        , caution(out, temp_para, caution_pre, caution_post)
+        , important(out, temp_para, important_pre, important_post)
+        , note(out, temp_para, note_pre, note_post)
+        , tip(out, temp_para, tip_pre, tip_post)
         , plain_char(phrase)
         , raw_char(phrase)
         , image(phrase)
@@ -143,7 +143,7 @@
         , start_varlistitem(phrase, start_varlistitem_)
         , end_varlistitem(phrase, end_varlistitem_)
 
-        , break_(phrase, break_mark)
+        , break_(phrase)
         , macro_identifier(*this)
         , macro_definition(*this)
         , do_macro(phrase)
@@ -157,7 +157,7 @@
         , start_row(phrase, table_span, table_header)
         , end_row(phrase, end_row_)
         , start_cell(phrase, table_span)
-        , end_cell(phrase, end_cell_)
+        , end_cell(phrase, temp_para)
         , anchor(out)
 
         , begin_section(out, phrase, doc_id, section_id, section_level, 
qualified_section_id)
@@ -170,8 +170,8 @@
         , escape_post(phrase, escape_post_)
     {
         // turn off __FILENAME__ macro on debug mode = true
-        std::string filename_str = debug_mode ? 
-            std::string("NO_FILENAME_MACRO_GENERATED_IN_DEBUG_MODE") : 
+        std::string filename_str = debug_mode ?
+            std::string("NO_FILENAME_MACRO_GENERATED_IN_DEBUG_MODE") :
             filename.native_file_string();
 
         // add the predefined macros
@@ -195,13 +195,13 @@
               , source_mode
             )
         );
-        
+
         out.push();
         phrase.push();
         temp.push();
         list_buffer.push();
         templates.push();
-    }   
+    }
 
     void actions::pop()
     {

Index: actions_class.hpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/detail/actions_class.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- actions_class.hpp   20 Dec 2006 15:41:20 -0000      1.8
+++ actions_class.hpp   27 Feb 2007 15:22:15 -0000      1.9
@@ -13,7 +13,7 @@
 #include "./actions.hpp"
 #include <boost/tuple/tuple.hpp>
 
-namespace quickbook 
+namespace quickbook
 {
     using namespace boost::spirit;
     namespace fs = boost::filesystem;
@@ -50,10 +50,11 @@
 
     // main output stream
         collector               out;
-    
+
     // auxilliary streams
         collector               phrase;
         collector               temp;
+        collector               temp_para;
         collector               list_buffer;
 
     // state
@@ -63,20 +64,20 @@
         int                     section_level;
         std::string             section_id;
         std::string             qualified_section_id;
-        std::string             source_mode;                   
-        
+        std::string             source_mode;
+
         typedef boost::tuple<
-            fs::path   
-          , fs::path   
+            fs::path
+          , fs::path
           , string_symbols
-          , int        
+          , int
           , std::string
           , std::string
           , std::string>
         state_tuple;
-        
+
         std::stack<state_tuple> state_stack;
-       
+
     // temporary or global state
         std::string             table_title;
         unsigned                table_span;
@@ -103,7 +104,7 @@
         code_action             code_block;
         inline_code_action      inline_code;
         phrase_action           paragraph;
-        simple_phrase_action    comment;
+        phrase_action           inside_paragraph;
         generic_header_action   h;
         header_action           h1, h2, h3, h4, h5, h6;
         markup_action           hr;
@@ -163,7 +164,7 @@
         markup_action           start_varlistitem;
         markup_action           end_varlistitem;
 
-        markup_action           break_;
+        break_action            break_;
         macro_identifier_action macro_identifier;
         macro_definition_action macro_definition;
         do_macro_action         do_macro;
@@ -177,7 +178,7 @@
         start_row_action        start_row;
         markup_action           end_row;
         start_col_action        start_cell;
-        markup_action           end_cell;
+        end_col_action          end_cell;
         anchor_action           anchor;
 
         begin_section_action    begin_section;

Index: markups.hpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/quickbook/detail/markups.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- markups.hpp 16 Nov 2006 11:57:16 -0000      1.5
+++ markups.hpp 27 Feb 2007 15:22:15 -0000      1.6
@@ -29,8 +29,8 @@
     const char* h6_pre              = "<bridgehead renderas=\"sect6\">";
     const char* h6_post             = "</bridgehead>";
     const char* hr_                 = "<para/>";
-    const char* blurb_pre           = "<para role=\"blurb\">\n";
-    const char* blurb_post          = "</para>\n";
+    const char* blurb_pre           = "<sidebar role=\"blurb\">\n";
+    const char* blurb_post          = "</sidebar>\n";
     const char* blockquote_pre      = "<blockquote><para>";
     const char* blockquote_post     = "</para></blockquote>";
     const char* preformatted_pre    = "<programlisting>";


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to